Boost logo

Boost Users :

From: Cosmin Cremarenco (cosmin_at_[hidden])
Date: 2008-01-23 09:47:20


Hi,

AFAIK you should never compute the inverse when trying to solve Ax = b.
Either user LU decomposition or for your tridiagonal matrix (I'm
guessing non-symmetrical) use the Thomas algorithm.
A description of the algorithm together with an implementation in C can
be found here: http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm

Hope that helps,

Cosmin

nisha kannookadan wrote:
> Hi everybody
>
> I need to solve a linear system Ax = b, where A is a tridiagonal matrix,
> is there an easy way to do it?
>
> I programmed an algo, which computes the inverse of the tridiagonal matrix
> with the usmani-algo and uses prod then, but this is quite time intense.
>
> I want to use the lapack bindings, but I dont get along with it. Im bit confused,
> if I need to install something additional to it, the way I tried out gesv, its not working
> and I get error msgs. I searched through out the www, but its hard to find good info.
>
> If somebody has already the code to solve linear equations with lapack,
> I would thankful, if he could post it here.
>
> Thank you
> Nisha K
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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