Hi,
I've compiled the C# (SWIG) version of quantlib and all is working. Now, trying to reproduce some example from the C++ version, I've noticed that some classes are missing, for example the "PathPricer". Does anyone is aware of the discrepancies between the C++ and C# version and how to reconcile them? Any help is welcome, many thanks. Paolo ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On 1 October 2009 at 14:53, Paolo Tenconi wrote: | I've compiled the C# (SWIG) version of quantlib and all is working. | Now, trying to reproduce some example from the C++ version, I've noticed | that some classes are missing, for example the "PathPricer". | Does anyone is aware of the discrepancies between the C++ and C# version and | how to reconcile them? Swig uses interface files (with extension .i) to generate wrapper code. It seems that these are were simply not created for the classes you are seeking: edd@ron:~/src/debian/QuantLib/QuantLib-SWIG-0.9.7/SWIG> grep PricePath * edd@ron:~/src/debian/QuantLib/QuantLib-SWIG-0.9.7/SWIG> Your best bet may be to start filling in the missing .i files. The quantlib-dev list may be of help. Dirk -- Three out of two people have difficulties with fractions. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Paolo Tenconi
On Thu, 2009-10-01 at 14:53 +0200, Paolo Tenconi wrote:
> I've compiled the C# (SWIG) version of quantlib and all is working. > Now, trying to reproduce some example from the C++ version, I've > noticed that some classes are missing, for example the "PathPricer". > Does anyone is aware of the discrepancies between the C++ and C# > version and how to reconcile them? Not all C++ classes are exported to C#, as you've been told. Also, in the particular case of PathPricer, there's the additional problem that, for our interfaces, polymorphism is difficult to support across languages (i.e., exporting a C++ base class and inheriting from it in C#.) It can be done, but it's going to take quite some thinking and some effort... Luigi -- Vin: It's like this fellow I knew in El Paso. One day, he just took all his clothes off and jumped in a mess of cactus. I asked him that same question, "Why?" Calvera: And? Vin: He said, "It seemed like a good idea at the time." -- The Magnificent Seven ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I also found many missing classes in the SWIG converted library... Is it worth it to invest a day in figuring out how to add interface files, or were they left out for a reason ?
I wonder if there is a different way to do what I am trying to do. I was looking for a way to access these methods: callableBond.cleanPrice() callableBond.yield() CashFlows.npvbps() CashFlows.duration() CashFlows.convexity() Should I use BondFunctions ? I can't find a sample of how to use it. Thank you, Simon |
Hello,
I think it's just that they were added later to the C++ library and nobody thought or bothered to add them to the SWIG layer (which, as you saw, is far from complete). If you have some time to add them, I'd be happy to merge your changes into the repository. Later, Luigi On Fri, Dec 6, 2013 at 4:33 PM, smazzucca <[hidden email]> wrote: > I also found many missing classes in the SWIG converted library... Is it > worth it to invest a day in figuring out how to add interface files, or were > they left out for a reason ? > > I wonder if there is a different way to do what I am trying to do. I was > looking for a way to access these methods: > callableBond.cleanPrice() > callableBond.yield() > CashFlows.npvbps() > CashFlows.duration() > CashFlows.convexity() > > Should I use BondFunctions ? I can't find a sample of how to use it. > > Thank you, > Simon > > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/C-swig-version-of-Quantib-tp8042p14693.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
This post was updated on .
That's great to hear! I'll keep you posted.
Thank you, Simon -----Original Message----- From: Luigi Ballabio [mailto:luigi.ballabio@gmail.com] Sent: Friday, December 06, 2013 10:48 AM To: Simon Mazzucca Cc: QuantLib users Subject: Re: [Quantlib-users] C# (swig) version of Quantib Hello, I think it's just that they were added later to the C++ library and nobody thought or bothered to add them to the SWIG layer (which, as you saw, is far from complete). If you have some time to add them, I'd be happy to merge your changes into the repository. Later, Luigi On Fri, Dec 6, 2013 at 4:33 PM, smazzucca <smazzucca@conceptonellc.com> wrote: > I also found many missing classes in the SWIG converted library... Is > it worth it to invest a day in figuring out how to add interface > files, or were they left out for a reason ? > > I wonder if there is a different way to do what I am trying to do. I > was looking for a way to access these methods: > callableBond.cleanPrice() > callableBond.yield() > CashFlows.npvbps() > CashFlows.duration() > CashFlows.convexity() > > Should I use BondFunctions ? I can't find a sample of how to use it. > > Thank you, > Simon > > > > > -- > View this message in context: > http://quantlib.10058.n7.nabble.com/C-swig-version-of-Quantib-tp8042p1 > 4693.html Sent from the quantlib-users mailing list archive at > Nabble.com. > > ---------------------------------------------------------------------- > -------- > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg. > clktrk _______________________________________________ > QuantLib-users mailing list > QuantLib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/quantlib-users -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful. ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list QuantLib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |