|
Boost Users : |
Subject: Re: [Boost-users] [uBLAS] Matrix inversion
From: Ryan (mccorywork_at_[hidden])
Date: 2011-03-02 13:18:25
On Wed, Mar 2, 2011 at 9:05 AM, sguazt <marco.guazzone_at_[hidden]> wrote:
> Sorry, but I don't understand why you can't use
>
>
> http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LU_Matrix_Inversion
>
> It is based on LU factorization (which is part of uBLAS).
>
I am using this function. It was my starting point. I just wanted to use
an "official" method if that was an option.
> Apart from checking at the beginning if the input matrix is square,
> what kind of other "checks" does it lack?
>
That is one of the checks I added. I also check if the inverse matrix is
the same size as the input matrix. If the inverse is a different size I
resize it to match the input matrix. A try/catch was also needed around the
lu_substitute if it failed.
> Personally I use (a variant of) the one above,
This is what I wanted to avoid by using an "official" method. I may not
have caught everything in my variant of the function and would really like
it not to give me problems.
Ryan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net