linbox
1
|
Vector factory. More...
#include <stream.h>
Public Member Functions | |
virtual Vector & | get (Vector &v)=0 |
Self_t & | operator>> (Vector &v) |
virtual size_t | size () const =0 |
virtual size_t | pos () const =0 |
virtual size_t | dim () const =0 |
virtual | operator bool () const =0 |
virtual void | reset ()=0 |
void | rewind () |
Legacy interface | |
These functions provide compatiblity with older parts of the library. Their use is deprecated. | |
Vector & | next (Vector &v) |
size_t | j () const |
size_t | m () const |
size_t | n () const |
Vector factory.
This is an abstract base class that generates a sequence of vectors in a generic way. Typical uses would be in tests, where the same test might be run on a sequence of random vectors or on e_1, ..., e_n.
virtual Vector& get | ( | Vector & | v | ) | [pure virtual] |
Get the next vector from the factory and store it in v
Implemented in StandardBasisStream< Field, _Vector, Trait >, RandomSparseStream< Field, _Vector, RandIter, Trait >, RandomDenseStream< Field, _Vector, RandIter, Trait >, and ConstantVectorStream< _Vector >.
Self_t& operator>> | ( | Vector & | v | ) | [inline] |
Extraction operator form
Reimplemented in StandardBasisStream< Field, _Vector, Trait >, RandomSparseStream< Field, _Vector, RandIter, Trait >, RandomDenseStream< Field, _Vector, RandIter, Trait >, and ConstantVectorStream< _Vector >.
virtual size_t size | ( | ) | const [pure virtual] |
Get the number of vectors to be constructed in this stream
Implemented in StandardBasisStream< Field, _Vector, Trait >, RandomSparseStream< Field, _Vector, RandIter, Trait >, RandomDenseStream< Field, _Vector, RandIter, Trait >, and ConstantVectorStream< _Vector >.
virtual size_t pos | ( | ) | const [pure virtual] |
Get the number of vectors constructed so far
Implemented in StandardBasisStream< Field, _Vector, Trait >, RandomSparseStream< Field, _Vector, RandIter, Trait >, RandomDenseStream< Field, _Vector, RandIter, Trait >, and ConstantVectorStream< _Vector >.
virtual size_t dim | ( | ) | const [pure virtual] |
Get the dimension of each vector
Implemented in StandardBasisStream< Field, _Vector, Trait >, RandomSparseStream< Field, _Vector, RandIter, Trait >, RandomDenseStream< Field, _Vector, RandIter, Trait >, and ConstantVectorStream< _Vector >.
virtual operator bool | ( | ) | const [pure virtual] |
Return true if and only if the vector stream still has more vectors to construct
Implemented in StandardBasisStream< Field, _Vector, Trait >, RandomSparseStream< Field, _Vector, RandIter, Trait >, RandomDenseStream< Field, _Vector, RandIter, Trait >, and ConstantVectorStream< _Vector >.
virtual void reset | ( | ) | [pure virtual] |
Reset the vector stream to the beginning.
Implemented in StandardBasisStream< Field, _Vector, Trait >, RandomSparseStream< Field, _Vector, RandIter, Trait >, RandomDenseStream< Field, _Vector, RandIter, Trait >, and ConstantVectorStream< _Vector >.
void rewind | ( | ) | [inline] |
Alias for reset