Markopy
Utilizing Markov Models for brute forcing attacks
|
Implementation of Marsaglia Random Engine. More...
#include <random.h>
Public Member Functions | |
Marsaglia () | |
Construct Marsaglia Engine. More... | |
unsigned long | random () |
Generate Random Number. More... | |
Public Attributes | |
unsigned long | x |
unsigned long | y |
unsigned long | z |
Protected Member Functions | |
std::random_device & | rd () |
Default random device for seeding. More... | |
std::default_random_engine & | generator () |
Default random engine for seeding. More... | |
std::uniform_int_distribution< long long unsigned > & | distribution () |
Distribution schema for seeding. More... | |
Implementation of Marsaglia Random Engine.
This is an implementation of Marsaglia Random engine, which for most use cases is a better fit than other solutions. Very simple mathematical formula to generate pseudorandom integer, so its crazy fast.
This implementation of the Marsaglia Engine is seeded by random.h default random engine. RandomEngine is only seeded once so its not a performance issue.
Example Use: Using Marsaglia Engine with RandomWalk
Example Use: Generating a random number with Marsaglia Engine
|
inline |
Construct Marsaglia Engine.
Initialize x,y and z using the default random engine.
Definition at line 132 of file random.h.
References Markov::Random::DefaultRandomEngine::distribution(), Markov::Random::DefaultRandomEngine::generator(), x, y, and z.
|
inlineprotectedinherited |
Distribution schema for seeding.
Definition at line 90 of file random.h.
Referenced by Marsaglia(), and Markov::Random::DefaultRandomEngine::random().
|
inlineprotectedinherited |
Default random engine for seeding.
Definition at line 82 of file random.h.
References Markov::Random::DefaultRandomEngine::rd().
Referenced by Marsaglia(), and Markov::Random::DefaultRandomEngine::random().
|
inlinevirtual |
Generate Random Number.
Reimplemented from Markov::Random::DefaultRandomEngine.
Definition at line 140 of file random.h.
Referenced by Markov::API::ModelMatrix::FastRandomWalkThread().
|
inlineprotectedinherited |
Default random device for seeding.
Definition at line 74 of file random.h.
Referenced by Markov::Random::DefaultRandomEngine::generator().
unsigned long Markov::Random::Marsaglia::x |
Definition at line 155 of file random.h.
Referenced by Marsaglia(), Markov::API::CUDA::Random::Marsaglia::MigrateToVRAM(), and random().
unsigned long Markov::Random::Marsaglia::y |
Definition at line 156 of file random.h.
Referenced by Marsaglia(), Markov::API::CUDA::Random::Marsaglia::MigrateToVRAM(), and random().
unsigned long Markov::Random::Marsaglia::z |
Definition at line 157 of file random.h.
Referenced by Marsaglia(), Markov::API::CUDA::Random::Marsaglia::MigrateToVRAM(), and random().