Login  Register

Arbitrary Solvers?

Posted by Daniel H on Oct 18, 2016; 12:58pm
URL: http://quantlib.414.s1.nabble.com/Arbitrary-Solvers-tp17812.html

Hello All,

 

Would it be possible to genericize CashFlows::yield (and by extension BondFunctions::yield) to take an arbitrary solver, instead of the default NewtonSafe solver?

 

Using a template parameter with a default value would have been backwards compatible but alas, using default template values is not possible pre-C++11 and QuantLib does not currently support dynamic dispatch for solvers so it cannot be passed into the function either.

 

Are there any possibilities of creating a patch to use an arbitrary solver at runtime? I would be happy to code it up.

 

Thanks,

DH


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev