This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Eigen-unsupported log matrix error C2039

Tags: None
(comma "," separated)
nelsons
Registered Member
Posts
23
Karma
0
Hi,

I try to do the equivalent of logm with complex numbers:

R = logm ([1 -1 -1;0 1 -1; 0 0 i])
R = [0.0000 + 0.0000i -1.0000 + 0.0000i -1.0708 + 1.2854i
0.0000 + 0.0000i 0.0000 + 0.0000i -0.7854 + 0.7854i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 1.5708i]
Eigen::Map<Eigen::MatrixXcd> matA(Az, (Eigen::Index)A.getDimensions().getRows(), (Eigen::Index)A.getDimensions().getColumns());
Eigen::Map<Eigen::MatrixXcd> matR(Rz, (Eigen::Index)R.getDimensions().getRows(), (Eigen::Index)R.getDimensions().getColumns());
matR = matA.log();

With VS 2015, I have an error:
error C2039: 'Options': is not a member of 'Eigen::Map<Eigen::MatrixXcd,0,Eigen::Stride<0,0>>'

1> LogMatrix.cpp
1>d:\eigen\eigen\src\eigenvalues\complexschur.h(58): error C2039: 'Options': is not a member of 'Eigen::Map<Eigen::MatrixXcd,0,Eigen::Stride<0,0>>'
1> d:\logmatrix.cpp(69): note: see declaration of 'Eigen::Map<Eigen::MatrixXcd,0,Eigen::Stride<0,0>>'
1> d:\eigen\unsupported\eigen\src\matrixfunctions\matrixfunction.h(432): note: see reference to class template instantiation 'Eigen::ComplexSchur<MatrixType>' being compiled

Does it a bug or complex numbers are not supported ?


This code does not return error but how to convert Res (EigenBase) to an Eigen::Map<Eigen::MatrixXcd>
doublecomplex* Rz = reinterpret_cast<doublecomplex*>((double*)R.getDataPointer());
Eigen::Map<Eigen::MatrixXcd> matR(Rz, (Eigen::Index)A.getDimensions().getRows(), (Eigen::Index)A.getDimensions().getColumns());
Eigen::EigenBase<Eigen::ReturnByValue<Eigen::MatrixLogarithmReturnValue<Eigen::Map<Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> > > > > Res;
Res = matA.log();


Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Sorry for late reply, but for the record, this issue is fixed in devel and 3.3 branches (it will make it in the future 3.3.4).


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]