mn::IPseudoRandomUtil< TSEEDTYPE > Class Template Referenceabstract
An Intarface for all randoms classes in this library. More...
#include <mn_random.hpp>
Classes | |
union | convers |
Union for type convertion. More... | |
Public Types | |
using | seed_t = TSEEDTYPE |
using | result_type = TSEEDTYPE |
Public Member Functions | |
IPseudoRandomUtil (seed_t startSeed) | |
Construct a new IPseudoRandomUtil object. More... | |
virtual unsigned char | rand8 ()=0 |
Get a random unsigned char number. More... | |
virtual unsigned short | rand16 ()=0 |
Get a random unsigned short number. More... | |
virtual unsigned int | rand32 ()=0 |
Get a random unsigned int number. More... | |
virtual seed_t | get_seed () |
Get the current used Seed. More... | |
virtual void | set_seed (seed_t seed) |
Set the a new seed. More... | |
result_type | operator() (bool b=true) const noexcept |
result_type | min () |
result_type | max () |
Protected Attributes | |
seed_t | m_startSeed |
Detailed Description
template<typename TSEEDTYPE>
class mn::IPseudoRandomUtil< TSEEDTYPE >
An Intarface for all randoms classes in this library.
- Template Parameters
-
TSEEDTYPE Seed Type
Class Documentation
◆ mn::IPseudoRandomUtil::convers
union mn::IPseudoRandomUtil::convers |
Member Typedef Documentation
◆ result_type
template<typename TSEEDTYPE >
using mn::IPseudoRandomUtil< TSEEDTYPE >::result_type = TSEEDTYPE |
◆ seed_t
template<typename TSEEDTYPE >
using mn::IPseudoRandomUtil< TSEEDTYPE >::seed_t = TSEEDTYPE |
Constructor & Destructor Documentation
◆ IPseudoRandomUtil()
template<typename TSEEDTYPE >
|
inline |
Construct a new IPseudoRandomUtil object.
- Parameters
-
startSeed The start seed
Member Function Documentation
◆ get_seed()
template<typename TSEEDTYPE >
|
inlinevirtual |
◆ max()
template<typename TSEEDTYPE >
|
inline |
◆ min()
template<typename TSEEDTYPE >
|
inline |
◆ operator()()
template<typename TSEEDTYPE >
|
inlinenoexcept |
◆ rand16()
template<typename TSEEDTYPE >
|
pure virtual |
Get a random unsigned short number.
- Returns
- A random unsigned short number
Implemented in mn::basic_random_lfsr, and mn::basic_ramdom_xorshift.
◆ rand32()
template<typename TSEEDTYPE >
|
pure virtual |
Get a random unsigned int number.
- Returns
- A random unsigned int number
Implemented in mn::basic_random_lfsr, and mn::basic_ramdom_xorshift.
◆ rand8()
template<typename TSEEDTYPE >
|
pure virtual |
Get a random unsigned char number.
- Returns
- A random unsigned char number
Implemented in mn::basic_random_lfsr, and mn::basic_ramdom_xorshift.
◆ set_seed()
template<typename TSEEDTYPE >
|
inlinevirtual |
Member Data Documentation
◆ m_startSeed
template<typename TSEEDTYPE >
|
protected |
The documentation for this class was generated from the following file: