how to use ginac output in gsl at runtime
Hello, Here is what I would like to do and I need a piece of advice on this. I want to use ginac to compute the gradient of a function so that I can use this gradient for the conjugate gradient method in gsl (the GNU scientific library). I succesfully computed the gradient and I can output its expression with "csrc_double" to a string. How can I use this expression in the definiton of a function at runtime? I guess other people had this problem too, to use a CAS library in conjuction with a numeric library, at runtime. Thanks a lot for any suggestion, Matei
I figured it out. I just use expression substitution and numeric evaluation, I do not use "csrc_double" to a string. Matei Matei Stroila wrote:
Hello,
Here is what I would like to do and I need a piece of advice on this. I want to use ginac to compute the gradient of a function so that I can use this gradient for the conjugate gradient method in gsl (the GNU scientific library). I succesfully computed the gradient and I can output its expression with "csrc_double" to a string. How can I use this expression in the definiton of a function at runtime?
I guess other people had this problem too, to use a CAS library in conjuction with a numeric library, at runtime.
Thanks a lot for any suggestion,
Matei
_______________________________________________ GiNaC-list mailing list GiNaC-list@ginac.de http://thep.physik.uni-mainz.de/mailman/listinfo/ginac-list
participants (1)
-
Matei Stroila