linbox
Archetypes in 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.

These additional interfaces are under construction.

In general, there are three uses for the archetypes classes: