Boost logo

Boost :

From: Andreas Harnack (ah.boost.04_at_[hidden])
Date: 2007-12-17 13:13:09

I'm not pretending to be an expert in Linear Algebra or in
numerical computing and I certainly wouldn't dare to submit a
full scale Linear Algebra library. (Though in all modesty, I
probably could take one about 2/3 of the people out there
working as professional programmers.) I'm just a computer
engineer how thinks that matrices could be a very useful and
handy tool in many situation, yet any time I reach out for it in
my (standard) toolbox it's just not there. And if I go to the
next DIY-market all I got offered is a whole range of highly
sophisticated CNC-all-in-one solutions, that are very shiny and
properly do an excellent job, but just won't fit into my modest
workshop, where I just want to, let's say, drill a few holes.
See my problem? And from what I read from the posts (this one as
well as earlier ones) there are a few people out there feeling
the same way.

If you think that this doesn't belong to the standard, then
please allow me to ask one question: Why is there a complex
number class in the standard and what does it actually do?
Complex numbers are useful in many situations, as matrices are,
yet the complex number class doesn't support a single one of
them. Or is there a function in the library to find the roots of
a polynomial or one to transform a signal sample from the time
to the frequency domain? No, and I think it shouldn't. So why is
everybody so keen to have a function to find eigenvalues in a
matrix class, which comes down to exactly the same problem?
Actually the complex number class does next to nothing. It is
essentially a structure of two equally typed elements, about the
most primitive data structure one could think off. It only
forwards a few operators of the base type, which are already
available in the language or in some other library. By far the
most complex function in the complex number class is the input
operator. And yet, the class is there, it's in the standard and
it is useful. (Well, at least it doesn't hurt.)

All I'm trying to propose is to do the same thing with a
two-dimensional array, about the second primitive data structure
one could think of. (The third actually, one-dimensional arrays
would come second, but it turned out that a matrix class without
a dedicated vector class is more useful then vice versa and,
after all, vectors are already in the standard too, though they
do almost ignore the algebraic aspect of vectors.) This is not
supposed to be an all-in-one solution, it shall only provide the
most elementary stuff. By most elementary I mean operations,
that are already there, somewhere in the standard. That's the
reason I'm not too bothered about numerical problems. Adding two
matrices doesn't impose more problems than folding a
Plus-functor to a vector. It won't solve any equations, but
matrices are not only about that.


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