Registered Member
|
My codes are like:
typedef Eigen::Matrix<_real, Eigen::Dynamic, Eigen::Dynamic> MatrixXX; typedef Eigen::Matrix<_real, Eigen::Dynamic, 1> MatrixX1; MatrixXX A; A.resize(numC, numC); ...............compute and fill A MatrixX1 b; b.resize(numC, 1); ...............compute and fill b Eigen::LLT<MatrixXX> llt; llt.compute(A); MatrixX1 x; x.resize(m_numC, 1); x= llt.solve(b); It turns out like x is all-zero. Is any thing I've done wrong in this Cholesky? Thanks. |
Moderator
|
you can check everything went ok with llt.info()==Success, after compute(.) and after solve(.). You can also check the result with (A*x - b).norm() which should be small. This assumes A is complete (both the lower and upper triangular parts are filled).
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]