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

Solving Sparse Problems

Tags: None
(comma "," separated)
nali
Registered Member
Posts
2
Karma
0

Solving Sparse Problems

Wed Oct 19, 2011 6:44 am
Hello,

i am new to eigen (and i like it) and i do not understand what i need to solve sparse problems.

I have a big symmetric rectangular (in some defined cases positive definite) matrix A with real coefficients.

I have to solve A system A*x = b multiple times where i do not have to store the inverse.

In the final step i need the inverse but only once.

Can i solve such problems (only) with eigen headers?
If not, where do i have to look for additional libraries for matrix sizes > 2000.

Thank you
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Solving Sparse Problems

Wed Oct 19, 2011 7:49 am
In your case, with the default branch you can do:

SimplicialLDLt<SparseMatrix<double> > solver;
solver.compute(A);
x = solver.solve(b);
x = solver.solve(b);
...


Why would you need the inverse? Even though A is sparse, its inverse is very unlikely to be sparse, so that's really not recommended to explicitly compute the inverse.
nali
Registered Member
Posts
2
Karma
0

Re: Solving Sparse Problems

Wed Oct 19, 2011 8:00 am
ggael wrote:In your case, with the default branch you can do:

SimplicialLDLt<SparseMatrix<double> > solver;
solver.compute(A);
x = solver.solve(b);
x = solver.solve(b);
...


Why would you need the inverse? Even though A is sparse, its inverse is very unlikely to be sparse, so that's really not recommended to explicitly compute the inverse.


Thank you for the answer, i will check it today.

I need the inverse because in general adjustment cases:

B*v + A*x -w = 0

where

B = dF/dv
A = dF/dx

with
v0 = residuals of the actual iteration
x = X0 - x0;
x0 parameters of the actual iteration
X0 adjusted parameters
w = -B*v0 + f(X0,V0)
Qll = weights

it can be shown that inv( [B*Qll*B' , A ; A' , 0 ] ) is the covariance matrix of the parameters. So this inverse is maybe the most imporant part of the adjustment. Of course its only needed after the adjustment is done. So i only need to invert it once.


Bookmarks



Who is online

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