|
openGPMP
Open Source Mathematics Package
|
Linear Congruential Generator. More...
#include <random.hpp>
Public Types | |
| using | result_type = uint64_t |
Public Member Functions | |
| LCG () | |
| LCG (uint64_t seed, uint64_t a=6364136223846793005ULL, uint64_t c=1442695040888963407ULL) | |
| uint64_t | operator() () |
| void | seed (uint64_t new_seed) |
| uint64_t | get_multiplier () const |
| uint64_t | get_increment () const |
| uint64_t | get_seed () const |
Private Attributes | |
| uint64_t | state |
| uint64_t | multiplier |
| uint64_t | increment |
Linear Congruential Generator.
| m | = modulus : 32-bit int max |
| a | = multiplier : 6364136223846793005 (from Knuth MMIX) |
| c | = increment : 1442695040888963407 (from Knuth MMIX) |
Definition at line 82 of file random.hpp.
| using gpmp::core::rndm::LCG::result_type = uint64_t |
Definition at line 84 of file random.hpp.
| gpmp::core::rndm::LCG::LCG | ( | ) |
Definition at line 39 of file random.cpp.
| gpmp::core::rndm::LCG::LCG | ( | uint64_t | seed, |
| uint64_t | a = 6364136223846793005ULL, |
||
| uint64_t | c = 1442695040888963407ULL |
||
| ) |
Definition at line 45 of file random.cpp.
| uint64_t gpmp::core::rndm::LCG::get_increment | ( | ) | const |
Definition at line 75 of file random.cpp.
| uint64_t gpmp::core::rndm::LCG::get_multiplier | ( | ) | const |
Definition at line 71 of file random.cpp.
| uint64_t gpmp::core::rndm::LCG::get_seed | ( | ) | const |
Definition at line 79 of file random.cpp.
| uint64_t gpmp::core::rndm::LCG::operator() | ( | ) |
Definition at line 49 of file random.cpp.
| void gpmp::core::rndm::LCG::seed | ( | uint64_t | new_seed | ) |
Definition at line 66 of file random.cpp.
|
private |
Definition at line 108 of file random.hpp.
|
private |
Definition at line 107 of file random.hpp.
|
private |
Definition at line 106 of file random.hpp.