Random Prime Generator.
More...
#include <random-prime.h>
Random Prime Generator.
Generates prime of specified length.
Constructor.
- Parameters
-
| bits | size of primes (in bits). Default is 30 so it can fit in a Linbox::Modular<double>. |
| seed | if 0 a seed will be generated, otherwise, the provided seed will be use. |
| const Prime_Type& operator* |
( |
| ) |
const |
|
inline |
get the random prime.
returns the actual prime.
| const Prime_Type& randomPrime |
( |
| ) |
const |
|
inline |
get the random prime.
returns the actual prime.
- Warning
- a new prime is not generated.
| static void setSeed |
( |
unsigned long |
ul | ) |
|
|
inlinestatic |
Sets the seed.
Set the random seed to be ul.
- Parameters
-
The documentation for this class was generated from the following file: