Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-08-22 18:02:51


On Wed, 22 Aug 2001, David Abrahams wrote:
david.>
david.> I agree that it's a design question. Here's the scenario I'm describing in
david.> more detail:
david.>
david.> A matrix is not a linear operator by itself; it's more of

Well, for convenience we'll probably want all the matrix classes to model
LinearOperator (for matrix vector multiplication) in addition to being
some sort of container.

david.> a container. You could make any of several linear
david.> operators from a given matrix, e.g. by sticking the matrix
david.> in a wrapper.
david.> In particular, if the matrix describes a linear operator
david.> with an exact inverse, you could make an
david.> InvertibleLinearOperator whose inverse_type contains the
david.> matrix's LU factorization and uses the usual
david.> forward/backsolve internally when the inverse is applied
david.> to a vector. Note that the inverse is NOT the inverse of
david.> the matrix (you can't efficiently index its elements), but
david.> it /is/ the inverse of the LinearOperator described by the
david.> matrix. Even if the matrix is singular, you may be able to
david.> make an ApproximatelyInvertibleLinearOperator (or
david.> something shorter ;0) from it, whose inverse uses, say,
david.> GMRES when it is applied to a vector.

Sounds good!

david.> I guess what I'm trying to emphasize here is that the
david.> factorization of a matrix is useful as a LinearOperator
david.> but is not, by itself, a matrix in the usual sense.

Right.

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-9761
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk