Login  Register

Re: swig some class are not wrapped

Posted by archlight on Mar 03, 2011; 10:08am
URL: http://quantlib.414.s1.nabble.com/swig-some-class-are-not-wrapped-tp6058p6066.html

Hi Luigi,

   Thanks for your reply. it is working with quantlib_wrapper in the download package. if I use swig to generate myself, it has such problem even though I don't touch any interface files.

   is it swig version issue?

   I will give a try on template directive when i get back home and give feed back here

Regards

On Thu, Mar 3, 2011 at 5:41 PM, Luigi Ballabio <[hidden email]> wrote:
On Thu, 2011-03-03 at 00:20 -0800, archlight wrote:
> It is the swap.py from examples folder. I am using swig2.0.1 executable.

Does it work if you don't modify volatilities.i and compile the original
files instead?

> by the way, how do I represent std::vector<std::vector<Handle > > in python.
> I am using numpy matrix but it says parameter type not matched
>
> I found something in vector.i but there is no nested vector example.

You must declare to swig that you'll use it--something like

%template() std::vector<std::vector<Handle<Quote> > >;

if I'm not mistaken.  After this, you should be able to pass a list of
lists of handles where std::vector<std::vector<Handle > > is required.

Luigi


--

Glendower: I can call spirits from the vasty deep.
Hotspur: Why, so can I, or so can any man;
But will they come when you do call for them?
-- King Henry the Fourth Part I, Act III, Scene I




------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users