OptimizationMethod class in QL-SWIG C#

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OptimizationMethod class in QL-SWIG C#

Jim Mallernee
Hi all,
 
Has anyone successfully implemented
a gradient search or any other optimization
with the C# bindings generated by QL-SWIG?
 
It seems that the C# classes have different
names than those in the original ql library.
In c++, there are classes for Problem,
LineSearchBasedMethod, ArmijoLineSearch,
and ConjugateGradient. In the C# code generated
by QL-SWIG there is only OptimizationProblem
and Optimizer.
 
I'm only trying to run a simple gradient search
method, exactly like what is offered in the original
c++ library, but in C#.
 
Any insight on the matter would be greatly appreciated.
 
-Jim

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: OptimizationMethod class in QL-SWIG C#

Luigi Ballabio
On Thu, 2011-07-14 at 11:14 -0400, Jim Mallernee wrote:
> Has anyone successfully implemented
> a gradient search or any other optimization
> with the C# bindings generated by QL-SWIG?

No, there's no such thing.  The problem is that the SWIG wrappers should
be able to take a native C# function, wrap it into something callable
from C++, and pass the latter to the C++ optimizer solve() method.  I
was able to do this for a few languages (Python, Ruby etc., see
functions.i for the implementation) but not for C# as I don't know the
API for C++/C# interface.  If you want to give it a try, let me know.

Luigi


--

Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away.
-- Antoine de Saint-Exupery



------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users