Random Integer Iterator.
More...
#include <random-integer.h>
template<bool _Unsigned = true, bool _Exact_Size = false>
class Givaro::RandomIntegerIterator< _Unsigned, _Exact_Size >
Random Integer Iterator.
Generates integers of specified length.
- Template Parameters
-
_Unsigned | if true , then only non negative integers are generated, if false , their sign is random. |
_Exact_Size | if true , then random integers have exactly the number of required bits, if false , they have less than the required number of bits |
- Examples:
- examples/Integer/givaro-ssh-keygen.C.
Constructor.
- Parameters
-
bits | size of integers (in bits) |
seed | if 0 a seed will be generated, otherwise, the provided seed will be use. |
copy constructor.
- Parameters
-
R | random iterator to be copied. |
copy.
- Parameters
-
R | random iterator to be copied. |
get the random integer.
returns the actual integer.
get the random integer.
returns the actual integer.
- Warning
- a new integer is not generated.
static void setSeed |
( |
uint64_t |
ul | ) |
|
|
inlinestatic |
Sets the seed.
Set the random seed to be ul
.
- Parameters
-
The documentation for this class was generated from the following file: