linbox
|
LinBox uses common object interfaces and archetypical instantiations.
This is done for several key concepts including blackbox matrices, fields, random iterators, and vectors.
LinBox objects and algorithms are parameterized by types which must meet the interface requirements described here. Parameterization is via C++ templates. The interface concepts are specified in classes called archetypes.
The archetype classes are similar in spirit to Java interfaces. However most of them are also instantiable and their instances are concrete objects. Originally archetypes were pure virtual classes and algorithms with archetype arguments could be written and separately compiled. However virtual classes cannot also provide templated member functions, and LinBox is moving to greater use of template member functions. In some cases, we forgo the separate complation and code bloat avoidance mechanism in favor of speed and flexibility using template members.
Archetypes exist for fields, field elements, random iterators, vectors, blackbox matrices, dense matrices, and sparse matrices.
LinBox::BlackboxArchetype
in linbox/blackbox/archetype.h
specifies this interface in detail. It is a parent class from which the various blackbox classes inherit.LinBox::FieldArchetype
in linbox/field/archetype.h
specifies this interface in detail and sets it up in such a way that algorithms can be compiled once against the field archetype. Alternatively, and with some performance gain, one can compile an algorithm separately against each field class used. For a listing of the field implementations see LinBox::FieldAbstract .LinBox::RandIterArchetype
in linbox/randiter/archetype.h
specifies this interface in detail.LinBox::ElementArchetype
in linbox/element/archetype.h
specifies this interface in detail.std::vector<Elt>
interface, where Elt
is the element type of the field involved. But we do not use the functionality concerning resizing vectors, resize
, push_back
, etc. An example of a class meeting this interface is LinBox::SubVector
.These additional interfaces are under construction.
std::vector
interface (including the resizing functionality) together with a handful of functions for manipulating polynomials. LinBox' design intentions are to exploit other software for any serious polynomial manipulation.In general, there are three uses for the archetypes classes: