Using DMatrix in compiler

3 posts / 0 new
Last post
Joined: 2014-01-03
Using DMatrix in compiler

I'd like to use casadi to invert a DMatrix, but for this I need to get swig to wrap the DMatrix functionality to java. I have been trying to get this to work for two days, but whatever I do it never works. 

Right now I imported 'import ifcasadi.DMatrix' after adding DMatrix references in java_casadi.i, ifcasadi.hpp and ifcasadi.cpp. It still does not get detected:

    [javac] Compiling 1143 source files to /media/psf/Home/Documents/Software/JModelica-9608/
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] /media/psf/Home/Documents/Software/JModelica-9608/ error: cannot find symbol
    [javac]             ifcasadi.DMatrix Amat = ifcasadi.DMzeros(n,n);
    [javac]                     ^
    [javac]   symbol:   class DMatrix
    [javac]   location: class ifcasadi


Could I get some advice/help on how to deal with this?


edit: possibly relevant: 

Joined: 2011-08-26
I am sorry to say that I

I am sorry to say that I currently can not help you, and more generally, the developers of the CasADi-related parts of the compiler are no longer working on the project. So no current developer can help you with this or the other similar questions that you have recently posted on the forum.

However, I will probably be taking over development of this part of the compiler, so in the long run I should be able to provide assistance. But currently I lack the knowledge, and I am also busy in other projects, so for now you are unfortunately on your own.

Joined: 2014-01-03
Okay! That's good to know.

Okay! That's good to know. Thanks for letting me know :)

The problem seemed to be that 'DMatrix' is not a class, but a specialisation/typedef: Matrix<double>. So I had to define the type in the swig files and then it worked.

Login or register to post comments