Random Prime Generator.
More...
#include <random-prime.h>
Random Prime Generator.
Generates prime of specified length.
- Examples:
- examples/qchar.C.
◆ RandomPrimeIterator()
Constructor.
- Parameters
-
bits | size of primes (in bits). Default is 27 so it can fit in a Linbox::Modular<double> . |
seed | if 0 a seed will be generated, otherwise, the provided seed will be use. |
◆ operator*()
const Prime_Type& operator* |
( |
| ) |
const |
|
inline |
get the random prime.
returns the actual prime.
◆ randomPrime()
const Prime_Type& randomPrime |
( |
| ) |
const |
|
inline |
get the random prime.
returns the actual prime.
- Warning
- a new prime is not generated.
◆ setSeed()
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: