[eigen] Bugs in Cholesky modules

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


Hello, I have found 2 bugs in the choleskyWithoutSquareRoot class:

- it does not work with 1x1 matrices. I added a quick workaround on my local copy that checks if the size is 1, but I do not know if there is a more elegant solution than that.

- the following code produces incorrect results:

const int N=10;

typedef float Scalar;

Eigen::Matrix<Scalar,N,N> I = Eigen::Matrix<Scalar,N,N>::Identity();

std::cout<<I.cwise().inverse().part<Diagonal>()<<std::endl;

1 0 0 0 0 0 0 0 0 0

inf 1 0 0 0 0 0 0 0 0

inf inf 1 0 0 0 0 0 0 0

inf inf inf 1 0 0 0 0 0 0

inf inf inf inf 1 0 0 0 0 0

inf inf inf inf inf 1 0 0 0 0

inf inf inf inf inf inf 1 0 0 0

inf inf inf inf inf inf inf 1 0 0

inf inf inf inf inf inf inf inf 1 0

inf inf inf inf inf inf inf inf inf 1

Also, how big can fixed-size matrices be? I encountered some problems to compile code with Matrix<float, 1000, 1000> classes. (I am working on a more complete bug report for that).

Any help will be much appreciated.

--

Timothy Hunter

Student (Stanford University)

T. 404 421 3075



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