Re: [eigen] cppduals - dual number implementation with Eigen specializations

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


Hi Toby,

Yes, that's literally my use case too - although I dont use Eigen's Pade' approximation, instead I have (partially, and admittedly somewhat sloppily) ported the great EXPOKIT to Eigen: https://gitlab.com/tesch1/eigen-expokit --  that padm() might work directly with ceres::Jet (but of course would be slower).  See https://gitlab.com/tesch1/cppduals/blob/master/tests/test_expm.cpp#L132 for an example.

To get Eigen's M.exp() to use the Pade approximant for a non-standard type, you might have to create some template trickery.  If you dont convince it that you actually want Pade, it silently falls back to the Sylvester's formula implementation, which I just checked doesn't work with cppduals (it compiles & runs but gives incorrect results - dunno why, didn't investigate).

As a side note, if you want really fast matrix exponential derivatives and have plenty of memory to throw at it:
- https://doi.org/10.1137/080716426
- https://github.com/scipy/scipy/blob/v0.14.0/scipy/linalg/_expm_frechet.py#L225

Cheers,
Michael


On Wed, Dec 4, 2019 at 11:35 AM Wood, Tobias <tobias.wood@xxxxxxxxx> wrote:

Hello Michael,

 

Would I be able to use the Eigen matrix functions, e.g. the matrix exponential, with your library? Literally in the last week I found that the ceres::Jet<> class does not work with the matrix exponential, due to issues with implicit conversions.

 

Thanks,

Toby



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