The documentation says:
In case A is a row-major matrix, the left eigenvectors are returned in the rows of V, in case A is a column-major matrix, the right eigenvectors are returned in the columns of V.
Example:
#include <blaze/Math.h>
#include <iostream>
int main(int, char * [])
{
blaze::DynamicMatrix<double, blaze::columnMajor> A {
{1., 3.},
{4., 2.}
};
blaze::DynamicMatrix<std::complex<double>, blaze::columnMajor> V1;
blaze::DynamicMatrix<std::complex<double>, blaze::rowMajor> V2;
blaze::DynamicVector<std::complex<double>, blaze::rowVector> lam;
eigen(A, lam, V1);
eigen(A, lam, V2);
std::cout << "V1:\n" << V1 << "\n";
std::cout << "V2:\n" << V2 << "\n";
return 0;
}
Output:
V1:
( (-0.707107,0) (-0.6,0) )
( (0.707107,0) (-0.8,0) )
V2:
( (-0.707107,0) (0.707107,0) )
( (-0.6,0) (-0.8,0) )
Apparently, the output of eigen()
also depends on the storage order of the V
argument. Either the documentation should be changed accordingly, of the function should be modified such that the result does not depend on the storage order of V
.
Hi Mikhail!
Thanks a lot for creating this issue. You are correct, the documentation of the
eigen()
function does not match its current behavior. In this case the documentation is incorrect/incomplete. The correct statement in the documentation should be:We apologize for the inconvenience and will fix the documentation as quickly as possible. Thanks again,
Best regards,
Klaus!