Boost logo

Ublas :

From: Paul C. Leopardi (leopardi_at_[hidden])
Date: 2005-05-28 00:28:46

My reply below. Best regards
On Fri, 27 May 2005 08:43 pm, Karl Meerbergen wrote:
> On Thursday 26 May 2005 16:52, Paul C. Leopardi wrote:
> > Dear Dan,
> > Yes, you can use uBLAS to invert matrices, but this might not be the
> > optimal way to do it. You use UBLAS to invert a matrix by doing solves on
> > each column of a unit matrix.
> > GluCat uses the uBLAS routines, originally because Joerg Walter wrote
> > them specially for GluCat, and then because it was the easiest thing to
> > do. Best regards
> In general computing the inverse of a matrix is a very bad idea. It is very
> expensive and numerically less relible than using a backtransformation. For
> a sparse matrix, I am sure that SuperLU is a lot more efficient than the
> ublas lu.

A particular algebraic operation is a "bad idea" or a "good idea" only in
relation to what you need to do. If you need to solve linear systems, I agree
that computing the inverse is a bad idea, and you are better off to use LU
decomposition and back substitution.

GluCat, though, is something far different. It is an embodiment of the
Clifford algebras over the real field. Its matrix_multi<> template class uses
matrices to represent the fundamental algebraic elements of a Clifford
algebra. One of the fundamental operations of the algebra is the
multiplicative inverse. Thus, for GluCat, computing the inverse of a matrix
is not only a good idea, it is vital.

Of course, since not all Clifford algebras are division algebras, not all
algebraic elements have an inverse. But that is another matter.