linbox
|
Random dense vector stream. More...
#include <stream.h>
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_t & | operator>> (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. | |
virtual Vector & | get (Vector &v)=0 |
Get the next vector from the factory and store it in v. | |
Self_t & | operator>> (Vector &v) |
Extraction operator form. | |
virtual size_t | size () const=0 |
Get the number of vectors to be constructed in this stream. | |
virtual size_t | pos () const=0 |
Get the number of vectors constructed so far. | |
virtual size_t | dim () const=0 |
Get the dimension of each vector. | |
virtual | operator bool () const=0 |
Return true if and only if the vector stream still has more vectors to construct. | |
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 |
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 |
Random dense vector stream.
Generates a sequence of random dense vectors over a given field
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.
F | Field over which to create random vectors |
r | |
n | Size of vectors |
m | Number of vectors to return (0 for unlimited) |
Vector& get | ( | Vector & | v | ) |
Get next element.
v | Vector into which to generate random vector |