|
Boost : |
From: Kevin Lynch (krlynch_at_[hidden])
Date: 2007-12-07 12:24:01
Andreas Harnack wrote:
> Hi @,
>
> shouldn't there be at least an elementary matrix class available
> in the standard? I notice there have been some discussions in
> the past, but there doesn't seem to be anything in the pipeline.
You're likely to find that such a thing would be a huge disappointment
(cf valarray :-)
Doing numerics "right" is REALLY hard, particularly when it comes to
matrix operations. Anything that manages to pass the hurdles of
standardization is likely to be:
1) underspecified to the point of worthlessness. This is not a shot at
the Committee ... it's just a really hard problem to do right,
2) missing key functionality for most subsets of the C++ user community.
Unfortunately, it won't be the SAME missing functionality for
different those different subgroups :-) For instance, you may only
need the ability to multiply small matrices together, but I need to do
Gauss-Jordan elimination, my neighbor only needs to find eigenvalues,
and his cousin only needs to find matrix permutations. Where do you
draw the line on what is "simple" enough to go into your "simple" matrix
class?
3) so slow and numerically unstable as to be worthless for most serious
uses. Naive implementations are really BAD news on these fronts. This
is an enormous QOI issue, and reasonable implementations need to be
implemented by numerics experts, not your garden variety programmer (I
know just enough to know how much I don't know).
To see just how difficult a problem this is, you might want to survey
the attempts to implement matrix functionality in C++: ublas, Blitz,
MTL, POOMA, and a host of others. All of them are enormous efforts,
they all make different trade offs, all of them are missing key
functionality, and all of them provide different performance and
correctness guarantees.
-- ------------------------------------------------------------------------------- Kevin Lynch voice: (617) 353-6025 Physics Department Fax: (617) 353-9393 Boston University office: PRB-361 590 Commonwealth Ave. e-mail: krlynch_at_[hidden] Boston, MA 02215 USA http://budoe.bu.edu/~krlynch -------------------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk