Random Integer Iterator.
More...
#include <random-integer.h>
|
static void | setSeed (uint64_t ul) |
| Sets the seed *** globally *** WARNING: i.e.
|
|
|
size_t | _bits |
| common length of all integers
|
|
Integer_Type | _integer |
| the generated integer.
|
|
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 WARNING, the seed is *** global *** WARNING: i.e. sets the seed for all Givaro Integer |
- Examples
- examples/Integer/givaro-ssh-keygen.C.
◆ RandomIntegerIterator() [1/3]
template<bool _Unsigned = true, bool _Exact_Size = false>
Constructor.
- Parameters
-
seed | if 0 a seed will be generated, otherwise, the provided seed will be used, *** globally *** Default bit size (30) can be changed with method 'setBitsize' |
◆ RandomIntegerIterator() [2/3]
template<bool _Unsigned = true, bool _Exact_Size = false>
Constructor.
- Parameters
-
seed | if 0 a seed will be generated, otherwise, the provided seed will be used, *** globally *** |
samplesize | is number ofpossible random values |
◆ RandomIntegerIterator() [3/3]
template<bool _Unsigned = true, bool _Exact_Size = false>
copy constructor.
- Parameters
-
R | random iterator to be copied. |
◆ operator=()
template<bool _Unsigned = true, bool _Exact_Size = false>
copy.
- Parameters
-
R | random iterator to be copied. |
◆ operator*()
template<bool _Unsigned = true, bool _Exact_Size = false>
get the random integer.
returns the actual integer.
◆ randomInteger()
template<bool _Unsigned = true, bool _Exact_Size = false>
get the random integer.
returns the actual integer.
- Warning
- a new integer is not generated.
◆ setSeed()
template<bool _Unsigned = true, bool _Exact_Size = false>
static void setSeed |
( |
uint64_t |
ul | ) |
|
|
inlinestatic |
Sets the seed *** globally *** WARNING: i.e.
sets the seed for all Givaro Integer Set the random seed to be ul
.
- Parameters
-
The documentation for this class was generated from the following file: