Re: [eigen] numerical differentiation

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]



Well, anyway, i've put one in unsupported/NumericalDiff on my eigen fork, it 
provides Forward and Central, with (quite basic) unit tests :

http://bitbucket.org/orzel/eigen2-
cminpack/src/tip/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h
http://bitbucket.org/orzel/eigen2-
cminpack/src/tip/unsupported/test/NumericalDiff.cpp

I use a template parameter 'mode' to select which one is used... and i have 
two questions related to this:

* in the code i use a switch(mode), in the hope that the compiler will 
optimize this and only the relevant code will be compiled-in, and no test will 
be made at run-time for the switch... can you confirm ?

* i'm afraid that the enum for the mode is cluttering the namespace.. how 
could i do better ? 

best regards,
Thomas


In data lunedì 28 settembre 2009 01:50:15, Thomas Capricelli ha scritto:
> Hello,
> 
> Is anybody working on providing 'numerical differenciation' for eigen ?
> (http://en.wikipedia.org/wiki/Numerical_differentiation).
> 
> libmv has something approaching (they use eigen) here:
> http://code.google.com/p/libmv/source/browse/trunk/src/libmv/numeric/functi
> on_derivative.h
> 
> but i'm not sure how general it can be made.
> 
> Ideally, there would be NumericalDifferenciation using forward difference,
> central difference, and some higher order formula
> 
> Thomas
> 

-- 
Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
http://www.freehackers.org/thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/