linbox
Public Member Functions
RandomDenseStream< Field, _Vector, RandIter, Trait > Class Template Reference

Random dense vector stream. More...

#include <stream.h>

+ Inheritance diagram for RandomDenseStream< Field, _Vector, RandIter, Trait >:
+ Collaboration diagram for RandomDenseStream< Field, _Vector, RandIter, Trait >:

Public Member Functions

 RandomDenseStream (const Field &F, RandIter &r, size_t n, size_t m=0)
 Constructor. More...
 
Vector & get (Vector &v)
 Get next element. More...
 
Self_toperator>> (Vector &v)
 Extraction operator form.
 
size_t size () const
 Number of vectors to be created.
 
size_t pos () const
 Number of vectors created so far.
 
size_t dim () const
 Dimension of the space.
 
 operator bool () const
 Check whether we have reached the end.
 
void reset ()
 Reset the stream to start at the beginning.
 
void rewind ()
 Alias for reset.
 
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
 

Detailed Description

template<typename Field, typename _Vector = BlasVector<Field, typename Vector<Field>::Dense>, class RandIter = typename Field::RandIter, class Trait = typename VectorTraits<_Vector>::VectorCategory>
class LinBox::RandomDenseStream< Field, _Vector, RandIter, Trait >

Random dense vector stream.

Generates a sequence of random dense vectors over a given field

Examples:
examples/dot-product.C.

Constructor & Destructor Documentation

◆ RandomDenseStream()

RandomDenseStream ( const Field &  F,
RandIter &  r,
size_t  n,
size_t  m = 0 
)

Constructor.

Construct a new stream with the given field and vector size.

Parameters
FField over which to create random vectors
r
nSize of vectors
mNumber of vectors to return (0 for unlimited)

Member Function Documentation

◆ get()

Vector& get ( Vector &  v)
virtual

Get next element.

Parameters
vVector into which to generate random vector
Returns
reference to new random vector

Implements VectorStream< _Vector >.


The documentation for this class was generated from the following file: