mlimberger
Registered Member

Hello.
I know, there are already two posts concerning this topic, but unfortunately they doesn't help on. ALthough it is not recommended, I want to inverse a sparse matrix. In particular, I want to calculate the covariance matrix from a given sparse normal equations matrix. For solving my least squares system I use a cholesky decomposition and solve it for the unknowns. This works quite well. Eigen::SparseMatrix A(n,n); //n=17495 Eigen::VectorXd b(n); Ax = b; Eigen::SimplicialCholesky<Eigen::SparseMatrix<double> > chol(A); x = chol.solve(b); But how to compute A^(1) Thank you in advance! Marco 
ggael
Moderator

call solve with a sparse matrix representing the identity matrix.

mlimberger
Registered Member

Thank you! My approach was to use the Lower triangular matrix from the Cholesky LLT. But you are completely right, using the Identity matrix works fine!
Again, thanks! 
Registered users: andreas_k, askinner, Baidu [Spider], Bing [Bot], boudewijn, capslock, drosca, Exabot [Bot], Google [Bot], google01103, Horus, irina_r, jlarrieux, kamathraghavendra, koriun, louis94, M4he, paulus3005, pedrorodriguez, rv8ter, scottpetrovic, Sergey294511, slangkamp, Sogou [Bot], vicnet, wolfi323, Yahoo [Bot]