Re: [eigen] fix double-promotion in 3.3 Core/SpecialFunctions.h

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


On 2016-05-05 15:04, Ilja Honkonen wrote:
Looks like boost has this covered:
http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/math_toolkit/powers/ct_pow.html
This overload would be nice for Eigen types also.

I'm really not sure how often this is needed and I guess this is very hard to implement optimally, e.g. for big matrices it could be worth to implementing pow<31>(A) as
  A.colPivLu().solve(pow<32>(A));
in case A is invertible.
cf: https://en.wikipedia.org/wiki/Addition-chain_exponentiation

And it gets really complicated if powers are part of bigger expressions, like for matrix A and vector x
  pow<k>(A)*x
might be cheapest to compute by k Matrix-vector products (which is O(k*n²) before doing any O(n³) matrix products.


Also, for Arrays the exponentiation should happen packet-by-packet if possible, of course.

But if someone likes to implement that, I would not object integrating it into Eigen.


Christoph




--
 Dipl. Inf., Dipl. Math. Christoph Hertzberg

 Universität Bremen
 FB 3 - Mathematik und Informatik
 AG Robotik
 Robert-Hooke-Straße 1
 28359 Bremen, Germany

 Zentrale: +49 421 178 45-6611

 Besuchsadresse der Nebengeschäftsstelle:
 Robert-Hooke-Straße 5
 28359 Bremen, Germany

 Tel.:    +49 421 178 45-4021
 Empfang: +49 421 178 45-6600
 Fax:     +49 421 178 45-4150
 E-Mail:  chtz@xxxxxxxxxxxxxxxxxxxxxxxx

 Weitere Informationen: http://www.informatik.uni-bremen.de/robotik



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