Boost logo

Boost :

From: lums_at_[hidden]
Date: 2001-03-13 08:14:22

It is important here to make the distinction between a linear algebra
library and an array library. Blitz++ is an array library. MTL
(e.g.) is a linear algebra library. One would expect (as is the
case), that linear algebra operations are not as easy in an array
library as they would be in a linear algebra library.

Array libraries and linear algebra libraries are easily confused
since linear operators (matrices) are commonly represented (at least
in the dense case) as two-dimensional arrays.

This distinction becomes quite obvious when developing layers of
abstraction and concepts for a linear algebra library. Formally (and
this comes from the precise definition that mathematicians have
developed over the years), a linear algebra consists of a linear
vector space (which is also formally defined) plus a set of linear
transformations that can be applied to that space. I think the
relationships between these entities has been well specified (both by
mathematicians and more relevant to a C++ library, by the generic
programming group at RPI). Arrays do not appear anywhere at this
layer. In fact, classic two dimensional arrays are only a small part
of what is required in the representation layer of a linear algebra

I have spent a good part of my professional career thinking about
these issues and they are quite non-trivial when you really start
digging into them. It does not seem difficult at first -- and
indeed, the world is full of not-very-good "matrix libraries" because
they are so easy to construct. Most such libraries I would not call
linear algebra libraries because most such libraries do not have any
kind of conceptual analysis of the linear algebra problem domain (so
I use the name "matrix library").

At the risk of tacky self-promotion, I would recommend Jeremy Siek's
MS thesis (about MTL) as an example of the kinds of analysis (and
implementation) that are required for a real linear algebra library:

--- In boost_at_y..., Toon Knapen <toon_at_s...> wrote:
> Dave Steffen wrote:
> >
> > Not at all - this is more or less how Blitz++ does it, although
> > syntax isn't quite as clean. It looks something like
> >
> > A = sum(B(i,k) * C(k,j), k); // A_ij = B_ik * C_jk
> >
> This syntax makes it also difficult to write y = Ax +b
> (A matrix ; y,x,b vectors)
> Blitz++ is indeed a superb library but this notations makes
> it difficult to use if for linear algebra.
> t

Boost list run by bdawes at, gregod at, cpdaniel at, john at