[GiNaC-list] Given a formal iterated derivative (GiNaC::fderivative), what actually is it?
Ricardo Buring
ricardo.buring at gmail.com
Thu Apr 7 17:30:52 CEST 2016
Dear list,
Using GiNaC one can define a symbolic/formal function f of two variables as
follows:
DECLARE_FUNCTION_2P(f)
REGISTER_FUNCTION(f, dummy())
Formal derivatives can be computed by defining symbols x, y and calculating
e.g.
f(x,y).diff(x, 3).diff(y, 2)
which is printed as
D[0,0,0,1,1](f)(x,y)
This is fantastic. Now, I would like to obtain the list [0, 0, 0, 1, 1]
from the above expression.
Checking the printing code GiNaC::fderivative::do_print, this is stored in
a GiNaC::paramset.
However, it's protected, and it doesn't seem to be accessible by any
method. My attempt
if (is_a<fderivative>(e))
{
fderivative fder = ex_to<fderivative>(e);
for (auto x : fder.parameter_set)
cout << x << ", ";
}
therefore fails. Could an accessor or some such be implemented so this
(basic) operation becomes possible?
Best regards,
Ricardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20160407/915ce37e/attachment.html>
More information about the GiNaC-list
mailing list