Boost logo

Ublas :

From: gunter.winkler_at_[hidden]
Date: 2005-07-28 04:08:51


Zitat von Dima Sorkin <dsorkin_at_[hidden]>:

> Hi.
> I have a small dense matrix (no more than 10x10),
> it is well conditioned. What can be the most portable
> way to get its inverse ? (portabe in the meaning
> of different versions of ublas).
> I'm not looking for "quick/efficient",
> just numerically stable and portable.

I would try this:

matrix<double> A;
matrix<double> Ainv = identity_matrix<double>( A.size1(), A.size2() );

lu_factorize(A);
lu_substitute(Ainv,A); // untested

mfg
Gunter