Just in case you think that you missed something,
Roscoe sent me a copy of his package and I asked him this question
in email that I sent to him but not to this group.
> I am working on an object-oriented framework for optimization algorithms
> so solve both general purpose nonlinear programs (NLP) and special NLPs
> that arise in chemical process systems engineering.
> My advisor's group have developed several successful optimization algorithms
> over the past 10 years or so and most of them have some common features
> but there was no plan to integrate them, maintenance is a nightmare
> and it is very time consuming to develop new algorithms based on old ones.
> I am trying to integrate these algorithms and develop new optimization
> algorithms in the process. I am also trying to develop a framework where
> iterative algorithms can be quickly prototyped based on existing ones.
> When I am finished with the major framework
> I will make the GeneralIterationPack publicly available.
>
> Specifically these optimization algorithms
> are Sequential Quadratic Programming (SQP) algorithms
> and one of the more important variations is Reduced Hessian SQP (rSQP)
> which is tailored to large NLPs with few degrees of freedom.
>
> The reason that I developed my linear algebra classes was because
> I needed them and I was not happy with anything I found out there,
> at least in the public domain. In retrospect
> I probably should have just purchased a commercial C++ matrix library
> but I was not really all that happy with those I found either.
> Any way it was a great learning experience
> and now I think that I am a very knowledgeable C++ programmer and designer
> and I have some useful tools to boot.
>
> LinAlgPack has a combination of features that I have not found
> in any other C++ matrix library:
>
> (1) VectorSlice objects represent any BLAS like 1-D vector abstraction.
A VectorSlice is what I call a SubVector.
> (2) GenMatrixSlice objects represent any general BLAS like 2-D matrix
> abstraction.
A GenMatrixSlice is what I call a SubMatrix.
I derive Vector from SubVector and Matrix from SubMatrix
so that user defined functions on a SubVector (or SubMatrix)
work just as well on a Vector (or Matrix).
I believe Roscoe's Vector class has a cast operator
which accomplishes the same thing
by converting a Vector into a VectorSlice.
> (3) A special STL compliant iterator (stride_itr<...>)
> is used to access the elements in a VectorSlice object
> and can therefore be used with any STL algorithm.
> What other library can say this?
>
> (4) Implementation of linear algebra operations
> is performed with the BLAS when possible.
>
> (5) Direct access to underlying data is available.
Apparently, the underlying data representation is a valarray<>.
> It is surprising how many libraries (especially commercial) do not allow this
> and force you to guess what the internal representation is.
How does Roscoe know that he picked the best possible representation?
Apparently, Kent Budge regrets the adoption of his valarray<> proposal.
What happens if valarray<> is deprecated.
If computer architecture evolves to favor a different representation,
all the application programs that rely on access to the underlying
representation would suddenly become obsolete.
If Roscoe were a commercial library developer,
he wouldn't be able to sell any more packages
and he would probably have a large number
of very angry customers attempting to sue him.
The library developer SHOULD hide the actual data representation
and provide implementation independent methods
which the portable application programmer can use to access data.
There is no way to deny the application program direct access
to the underlying data representation but the library developer
is not obliged to support application programs which do so.
It is important to distinguish the role played by the library developer
from the role played by the application programmer.
So far, Roscoe has been playing both roles and he wants to continue doing so.
That's fine as long as he is the only one using his library.
If he decided to change the underlying representation,
he could just change all of his applications as well.
But I hope, if he has convinced someone else to use his library,
he would consider what effect changes in his library would have
on their applications and devise some scheme to ensure
that the impact would be minimized.
The actual data representation is irrelevant to the application programmers
if the library is complete and well designed but if they discover
a deficiency in the library, they may require direct access to fix it.
In this case, the application programmer switches hats
and becomes a "library co-developer"
in an implicit partnership with the original library developer.
Usually, application programmers can get all the cooperation they need
from the library developer as long as they don't require any additional
commitments from the library developer.
> Other C++ matrix libraries like TNT, LAPACK++ and others
> offer some of these features but not all of them.
>
> All I want is a fairly efficient and sensible interface for linear algebra
> computations that will be compatible with existing software (Fortran).
> And for developers to get their work done they need more than just nice
> vector and matrix abstraction classes but an entire set of linear algebra
> operations.
I think these requirements are typical.
The libraries must have a fairly complete set of capabilities.
It won't really help much to standardize a "bare bones" template class
and leave all the specializations up to the application programmer.
We really need to standardize all the specializations
for the all types that are of general interest to scientists and engineers.
Bob Tisdale