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

Newbie question on Cholesky

Tags: None
(comma "," separated)
quaid
Registered Member
Posts
4
Karma
0
OS

Newbie question on Cholesky

Wed Mar 21, 2012 4:26 am
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.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Newbie question on Cholesky

Thu Mar 22, 2012 8:54 am
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).


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]