Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

VectorStream Class Template Reference
[linbox/vector]

#include <stream.h>

Inheritance diagram for VectorStream:

ConstantVectorStream RandomDenseStream RandomSparseStream StandardBasisStream List of all members.

Detailed Description

template<class _Vector>
class LinBox::VectorStream< _Vector >

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.


Public Member Functions

virtual Vector & get (Vector &v)=0
Self_toperator>> (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


Member Function Documentation

virtual Vector& get Vector &  v  )  [pure virtual]
 

Get the next vector from the factory and store it in v

Implemented in ConstantVectorStream, RandomDenseStream, RandomSparseStream, and StandardBasisStream.

Self_t& operator>> Vector &  v  )  [inline]
 

Extraction operator form

Reimplemented in ConstantVectorStream, RandomDenseStream, RandomSparseStream, and StandardBasisStream.

virtual size_t size  )  const [pure virtual]
 

Get the number of vectors to be constructed in this stream

Implemented in ConstantVectorStream, RandomDenseStream, RandomSparseStream, and StandardBasisStream.

virtual size_t pos  )  const [pure virtual]
 

Get the number of vectors constructed so far

Implemented in ConstantVectorStream, RandomDenseStream, RandomSparseStream, and StandardBasisStream.

virtual size_t dim  )  const [pure virtual]
 

Get the dimension of each vector

Implemented in ConstantVectorStream, RandomDenseStream, RandomSparseStream, and StandardBasisStream.

virtual operator bool  )  const [pure virtual]
 

Return true if and only if the vector stream still has more vectors to construct

Implemented in ConstantVectorStream, RandomDenseStream, RandomSparseStream, and StandardBasisStream.

virtual void reset  )  [pure virtual]
 

Reset the vector stream to the beginning.

Implemented in ConstantVectorStream, RandomDenseStream, RandomSparseStream, and StandardBasisStream.

void rewind  )  [inline]
 

Alias for reset


The documentation for this class was generated from the following file:
Generated on Thu Feb 8 22:33:08 2007 for linbox by doxygen 1.3.4