Re: [eigen] AutoDiff: complex doesn't compile

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


Dear Christoph,


Am 12.09.2016 um 11:10 schrieb Christoph Hertzberg:
The template argument of AutoDiffScalar is supposed to hold the partial derivatives (which are always real). If you want complex AutoDiffs, all you can do is:

  typedef Eigen::AutoDiffScalar<Eigen::Vector2d> TpRFloat;
  typedef std::complex<TpRFloat> TpCFloat;

This does not take into account if functions are actually complex derivable, unfortunately.


Thanks for the clarification.
To the best of my knowledge,
"The effect of instantiating the template complex for any other type is unspecified."
and types are float, double, long double.

So I would hesitate using std::complex<TpRFloat>. I just don't know whether there are pitfalls.

Anyway,  I only tried it it for testing Householder.

Best regards,
Peter



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