[eigen] matrix exponential with c++0x |

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

*To*: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: [eigen] matrix exponential with c++0x*From*: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>*Date*: Mon, 30 Nov 2009 12:03:21 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=d9CrniW02/3LUyrA3Zdcc+aYOVn6BWun55CCttMLI7Q=; b=haB7uRI9OH3utwYtPxTNJC/ybjFZ5fic7t46xYqQDx4K+HzPhexhBthGJ1iz4PobE/ 1APsjpWEQR1n7jdKiZC5aEb/O73UbhLVBpjof0Z2K18KCGaIqngEA4kRo7QncgVJHNlv 2F/B2cMlhCAtV6G5xGJ7FFmO41E4aT/olpLRk=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=KTSYHzsnkjf5u7b/VF1syOmYHqWjDVLo085VZbzgcORWLBlBilasQrJNEOuR40Zplw 5+Ccrl/PE1HZ9k1ANPfHya2Fl27T3lUUqg5ZkwCHNZlcXiAse5v9GT44d6OIfsWIEvts HkRjiJsZqoU1CC3WbRyGRUT6kqBVjBoZkgqzg=

Hi,

I tried to compile the unit tests with c++0x and the matrix exponential stuff failed. I got actually two errors where the first one was trivial to fix though I am not sure anymore whether the fix is correct considering the second error.

First, M_LOG2_E suddenly was not defined anymore so I added

#if defined(log2) && !defined(M_LOG2_E)

#define M_LOG2_E 0.693147180559945309417

#endif

Then, a second error popped up in

void MatrixExponential<MatrixType>::computeUV(float)

where the compiler claimed that for this _expression_

MatrixType A = *m_M / std::pow(Scalar(2), m_squarings);

no matching operator / exists. It would be great if you could check whether and how to fix this. Everybody else is of course invited to provide fixes as well. At the moment I just don't have much time to do so.

The last error is really strange. I tried to play a little bit with it and it seems that std::pow(std::complex<double>(2), int) is returning a std::complex<float>. At least I get the error message "conversion from 'std::complex<double>' to non-scalar type 'const std::complex<float>' requested" when I try the following code

const Scalar tmp = std::pow(Scalar(2), m_squarings);

MatrixType A = *m_M / tmp;

Regards,

- Hauke

**Attachment:
matrix_exp.patch**

**Follow-Ups**:**Re: [eigen] matrix exponential with c++0x***From:*Thomas Capricelli

**Re: [eigen] matrix exponential with c++0x***From:*mmoll

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] combine matrix blocks** - Next by Date:
**Re: [eigen] matrix exponential with c++0x** - Previous by thread:
**Re: [eigen] renaming 'precision' to 'dummy_precision'** - Next by thread:
**Re: [eigen] matrix exponential with c++0x**

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