Public Member Functions |
Private Types |
Private Member Functions |
Private Attributes |
List of all members
mn::basic_ramdom_xorshift Class Reference
Pseudro-Random Number Generator based on xor_shift128++ generator. More...
#include <mn_ramdom_xorshift.hpp>
Inheritance diagram for mn::basic_ramdom_xorshift:
Collaboration diagram for mn::basic_ramdom_xorshift:
Public Member Functions | |
basic_ramdom_xorshift (unsigned int startSeed) | |
virtual unsigned char | rand8 () override |
Get a random unsigned char number. More... | |
virtual unsigned short | rand16 () override |
Get a random unsigned short number. More... | |
virtual unsigned int | rand32 () override |
Get a random unsigned int number. More... | |
virtual seed_t | get_seed () override |
Get the current used Seed. More... | |
virtual void | set_seed (seed_t seed) override |
Set the a new seed. More... | |
Public Member Functions inherited from mn::IPseudoRandomUtil< unsigned int > | |
IPseudoRandomUtil (seed_t startSeed) | |
Construct a new IPseudoRandomUtil object. More... | |
result_type | operator() (bool b=true) const noexcept |
result_type | min () |
result_type | max () |
Private Types | |
using | base_type = IPseudoRandomUtil< unsigned int > |
Private Member Functions | |
void | init (unsigned int seed) |
Private Attributes | |
unsigned long | m_xorandArray [4] |
Additional Inherited Members | |
Public Types inherited from mn::IPseudoRandomUtil< unsigned int > | |
using | seed_t = unsigned int |
using | result_type = unsigned int |
Protected Attributes inherited from mn::IPseudoRandomUtil< unsigned int > | |
seed_t | m_startSeed |
Detailed Description
Pseudro-Random Number Generator based on xor_shift128++ generator.
Member Typedef Documentation
◆ base_type
|
private |
Constructor & Destructor Documentation
◆ basic_ramdom_xorshift()
|
inline |
Member Function Documentation
◆ get_seed()
|
inlineoverridevirtual |
Get the current used Seed.
- Returns
- The current used Seed
Reimplemented from mn::IPseudoRandomUtil< unsigned int >.
◆ init()
|
private |
◆ rand16()
|
overridevirtual |
Get a random unsigned short number.
- Returns
- A random unsigned short number
Implements mn::IPseudoRandomUtil< unsigned int >.
◆ rand32()
|
overridevirtual |
Get a random unsigned int number.
- Returns
- A random unsigned int number
Implements mn::IPseudoRandomUtil< unsigned int >.
◆ rand8()
|
overridevirtual |
Get a random unsigned char number.
- Returns
- A random unsigned char number
Implements mn::IPseudoRandomUtil< unsigned int >.
◆ set_seed()
|
inlineoverridevirtual |
Set the a new seed.
- Parameters
-
seed Tde new used seed
Reimplemented from mn::IPseudoRandomUtil< unsigned int >.
Member Data Documentation
◆ m_xorandArray
|
private |
The documentation for this class was generated from the following files: