|
Boost : |
Subject: Re: [boost] [math] Does any one interesting in calculating derivative for a expression automatically?
From: Dongfei Yin (yin.dongfei_at_[hidden])
Date: 2009-03-04 06:00:05
Hi Bruno,
thank you for your interesting, I will try to use proto, I never use
it before.
yes, It's technically feasible. but the type of all the symbol in
the expression can not be the build-in type.
and gamma function should be a special version.
integral is more difficult than derivative, else, to calculate the
volume will be more easier.
to simplify the expression is a interesting work. especially in
compile time.
BTW: I do not know how to upload source to this system, do you know how
to do that?
Dongfei.
> >From my point of view, the main interest would be to compute
> expressions containing some compile-time values provided by the user.
> For example I want to calculate the volume of a hypersphere which is:
> (pi^(N/2)*r^N) / gamma(N/2 + 1), with dimension N known at
> compile-time. If the user happens to work only with N=2, that is
> circles, I want the resulting expression to be as effective as a
> hand-written pi*r^2 (the volume of a hypersphere<2> is the area of a
> circle). It's technically feasible.
>
> Bruno
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk