Glas :[glas] introducing the storage concept, a first interface specification |
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2005-01-18 04:10:02
Dear all,
Before we can discuss LA algorithms, we need properly designed
containers (vectors and matrices of all kinds). Because Glas is intended
to be a _generic_ interface specification, this design involves defining
concepts (just like the STL does:
http://www.sgi.com/tech/stl/stl_introduction.html).
And when defining concepts, it's very informative to directly implement
some of these concepts to put them directly to the test.
So I started defining some concepts and implementing a small prototype.
The most obvious of the concepts we need are vectors and matrices. So I
started out with vectors.
But when defining vectors, we also need to define how these vectors
store their elements. Therefore I initially concentrated on defining the
Storage concept. You can find an introduction to this concept here:
http://www.femtown.org/glas/doc/intro_storage.html)
To test this concept a bit and to show its relation with other concepts,
I also defined some other concepts like Vector, SparseVector,
VectorSpaceElement. These are currently not intended to be complete but
serve only to clarify the relation between these concepts and the storage.
Additionally I also implemented some models of the Storage concept. And
again I also implemented a very small part of a dense vector just to
show the relation between the vector and the storage. Additionally in
the test subdirectory there are a few tests for instance for a 'scal'
operation on a vector.
You can download the whole proto with documentation in
tgz format (http://www.femtown.org/glas.tgz) or
zip format (http://www.femtown.org/glas.zip) or
just browse
http://www.femtown.org/glas and
http://www.femtown.org/glas/doc/index.html.
The latter is an index to the whole documentation.
This is thus a first attempt to start the specification of the glas
interface and starting with these underlying concepts might not be the
most rewarding task. On the other hand, we are currently a very
heterogenous group (with a mix of experts in C++ and linear algebra) and
the following discussions will also allow us to establish a common
terminology that will facilitate our discussions in the future.
So I would appreciate any feedback on this storage concept.
BTW: You can see also (part of) the conclusion of the discussion on the
value_type's is documented. For instance, the documentation of the
Vector concept mentions that it is a refinement of the
VectorSpaceElement concept when its value_type's are defined in a field.
(It is kind of weird though to have this /conditional/ refinement).
Toon