Subject: Re: [ublas] Help with lu_factorize
From: Nasos Iliopoulos (nasos_i_at_[hidden])
Date: 2009-09-15 12:12:50
lu_factorize(A) : A == L*U
lu_factorize(A2, P) : P*A2 ==L*U
P is a permutation matrix that interchanges the rows of A2. In some cases a matrix cannot be factored, so using pivoting with the permutation matrix can give you a factorisation. Also solving a system with and without pivoting has some slight differences.
I hope this helps.
> Date: Tue, 15 Sep 2009 17:46:15 +0200
> From: marco.guazzone_at_[hidden]
> To: ublas_at_[hidden]
> Subject: [ublas] Help with lu_factorize
> I don't understand how the function lu_factorize(A) works (note: only
> the version with one parameter, which I think is for LU without
> I didn't find any documentation of this function so I've decided to
> experiment a bit with it.
> I've attached an example.
> The input matrix is:
> Input matrix
> In this example I use both lu_factorize(A) and lu_factorize(A,P)
> (i.e.,with the permutation matrix).
> The last one works perfectly. After call it, A is what I expected
> (also verified with Mathematica and Octave).
> LU *with* permutation matrix
> res: 0
> The first one instead gives a result that I'm not able to understand.
> LU *without* permutation matrix
> res: 0
> NOTE: I'm using Boost 1.40 and GCC 4.4.1. I've compiled with:
> $ g++ -o lu -Wall -Wextra -pedantic -ansi lu.cpp
> Can you give me an help, please?
> -- Marco
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.