linbox
Public Member Functions
RandomIntegerIter< _Unsigned > Class Template Reference

Random Integer Iterator. More...

#include <random-integer.h>

Public Member Functions

 RandomIntegerIter (unsigned int bits=30, uint64_t seed=0)
 Constructor. More...
 
 ~RandomIntegerIter ()
 destructor.
 
 RandomIntegerIter (const RandomIntegerIter &R)
 copy constructor. More...
 
RandomIntegerIteroperator= (const RandomIntegerIter &R)
 copy. More...
 
const integerrandom (integer &a) const
 get the random integer. More...
 

Detailed Description

template<bool _Unsigned = true>
class LinBox::RandomIntegerIter< _Unsigned >

Random Integer Iterator.

Generates integers of size smaller than a prescribed one. This class is closer to the LinBox::RandIterArchetype.

Todo:
one could create the same one on a LinBox::PID_double ?
Template Parameters
_Unsignedif true, then only non negative integers are generated, if false, their sign is random.

Constructor & Destructor Documentation

RandomIntegerIter ( unsigned int  bits = 30,
uint64_t  seed = 0 
)
inline

Constructor.

Parameters
bitsmax size of integers (in bits)
seedif 0 a seed will be generated, otherwise, the provided seed will be use.
RandomIntegerIter ( const RandomIntegerIter< _Unsigned > &  R)
inline

copy constructor.

Parameters
Rrandom iterator to be copied.

Member Function Documentation

RandomIntegerIter& operator= ( const RandomIntegerIter< _Unsigned > &  R)
inline

copy.

Parameters
Rrandom iterator to be copied.
const integer& random ( integer a) const
inline

get the random integer.

Parameters
[out]athe new integer number

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