swig and java bindings

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

swig and java bindings

Richard Gomes
Hi Chaps,

I have some code already written in Java, using third party math libs and
I'm evaluating the possibility of adopting QuantLib as far as possible.

I've noticed that swig did an incomplete job, for instance:

//
// This is a Java code trying to use Matrix from QuantLib
//

// Create 2 matrices
Matrix a = new Matrix(4, 4);
Matrix b = new Matrix(4, 4);

// SWIG did not converted C++: operator[] to something like
// Java: Array get(int)
a[0][3] = 5; // it does not compile in Java

// SWIG did not converted C++: operator* to something like
// Java: Matrix multiply(Matrix)
Matrix c = a * b; // it does not compile in Java

How it can be done?

Thanks in advance.

--
Richard Gomes



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev