For variety, let me say that I emphatically disagree. One of the
central impediments to algorithm reusability in numerical libraries
that have gone before, is rigid assumptions about data layout and
types of arguments. Reusing Numerical Recipes routines is a perfect
example of how insanely difficult it is to reuse numerical libraries.
The last time I need an NR routine, I found that it took wildly
different arguments than what I had, had wildly different assumptions
about both layout and indexing, than what I had, and ultimately I was
forced to recode the whole thing by hand. This is precisely what you
should NOT have to do to use a "standard library" component.
I submit that the right way to write "standard" numerical components
int C++ is the same way the C++ standards committee has chosen to
implement "standard" data structures components. These are
emphatically /not/ easily useable from C. They in fact cannot be used
at all in C, nor should they be.
In my opinion, any meaningful "standard" for object oriented numerics
in C++, will have to be built around container-free interfaces,
implemented via C++'s support for genericity (aka "templates"). I see
little hope for reusing C++ template libraries in languages other than
C++. Other languages which support genericity, could probably
implement similar libraries using the same techniques, but it should
be understood clearly that genericity is orthogonal to "object
oriented". The STL algorithms library, is templated, but not object
oriented in any meaninful way. These properties will need to be true
of standard numerical libraries as well.
I have an article under construction which describes how to do this
sort of thing in C++. I would be happy to make it available to this
list once it has achieved techreport status.
-- Geoffrey Furnish email: furnish@lanl.gov LANL CIC-19 POOMA/RadTran phone: 505-665-4529 fax: 505-665-7880"Here are your ball-peen hammers. Now go malleate some heads!" -Jim Morel