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

LU decomposition

Tags: None
(comma "," separated)
User avatar
markusfroeb
Registered Member
Posts
6
Karma
0
OS

LU decomposition

Sat Feb 21, 2009 12:30 pm
There is a misprint in the tutorial, part 3, which says to use Eigen::LUDecomposition where it should be Eigen::LU.

And a question: Is it possible to do the solving after a LU decomposition in-place? Like LU::solve(a, a), or does the algorithm need access to the original coefficient matrix at all times?
User avatar
bjacob
Registered Member
Posts
658
Karma
3

RE: LU decomposition

Sat Feb 21, 2009 2:28 pm
markusfroeb wrote:There is a misprint in the tutorial, part 3, which says to use Eigen::LUDecomposition where it should be Eigen::LU.


Thanks, fixed now in trunk (will be in 2.1).

markusfroeb wrote:And a question: Is it possible to do the solving after a LU decomposition in-place? Like LU::solve(a, a), or does the algorithm need access to the original coefficient matrix at all times?


At least currently, you can do solve(a, &a), there will be no aliasing effect, indeed because of full pivoting the solver needs to first copy a into a new matrix anyway.

That however is an implementation detail, it remains to be clarified whether we want to make this a guaranteed behavior, i'll make sure to clarify this for 2.1, first I need to finish the partial pivoting variant and see how it works there.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
User avatar
markusfroeb
Registered Member
Posts
6
Karma
0
OS

RE: LU decomposition

Sat Feb 21, 2009 3:48 pm
In-place solving saves me half of the vector copies in my implicit Runge-Kutta ODE solver, so this would be great to have as a feature. Maybe it would be useful to have a inPlaceSolve( b ) method, like for triangular matrices?
User avatar
bjacob
Registered Member
Posts
658
Karma
3

RE: LU decomposition

Sat Feb 21, 2009 3:53 pm
markusfroeb wrote:In-place solving saves me half of the vector copies in my implicit Runge-Kutta ODE solver, so this would be great to have as a feature. Maybe it would be useful to have a inPlaceSolve( b ) method, like for triangular matrices?


I'll think of that. Sounds indeed like a good idea. As I said, some changes are coming as I'll soon add the partial pivoting variant. So it's useful for me to have your suggestions now, but i can only make an informed opinion once i've really been playing with the code.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
User avatar
markusfroeb
Registered Member
Posts
6
Karma
0
OS

RE: LU decomposition

Sat Feb 21, 2009 3:58 pm
Yes, of course, I was just making suggestions. I'm not an expert in the field of numerical linear algebra, and having an efficient library with nice and helpful developers is wonderful. So keep up the good work!


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell