Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cRandomBGenerator Class Reference

#include <cRandomFloat.h>

Inheritance diagram for GrayLib::cRandomBGenerator:
GrayLib::cRandomFloat Gray::cRandomBase Gray::IRandomNoise

Public Member Functions

 cRandomBGenerator (const void *pData, size_t iSize)
 
virtual ~cRandomBGenerator ()
 
virtual void InitSeed (const void *pData, size_t iSize) override
 initialization More...
 
virtual UINT get_RandUns () override
 
- Public Member Functions inherited from GrayLib::cRandomFloat
virtual double get_RandDouble ()
 the default random number generator. More...
 
virtual float get_RandFloat ()
 
double GetRandDX (double nScale)
 
float GetRandFX (float nScale)
 
float GetRandFRange (float fRangeLo, float fRangeHi)
 
 UNITTEST_FRIEND (cRandomFloat)
 
- Public Member Functions inherited from Gray::cRandomBase
 cRandomBase () noexcept
 
virtual ~cRandomBase ()
 
void InitSeed (IRandomNoise *pSrc, size_t iSize)
 the default random number generator. NOT Thread Safe! More...
 
void InitSeedDefault (size_t iSize=sizeof(int))
 
void InitSeedUns (UINT iSeed)
 
virtual HRESULT GetNoise (void *pData, size_t iSize) override
 fill array with random. return # filled. More...
 
bool GetRandBool ()
 
virtual UINT GetRandUX (UINT nScale)
 
int GetRandIRange (int iRangeLo, int iRangeHi)
 

Protected Attributes

int m_p1
 
int m_p2
 indexes into buffer More...
 
UINT m_randbuffer [k_KK]
 history buffer More...
 

Additional Inherited Members

- Public Types inherited from Gray::cRandomBase
typedef UINT SEED_t
 default seed size might be 32 or 64 bit depending on k_RAND_MAX. More...
 

Detailed Description

How expensive ? How random ? RESOLUTION = 32 bits

Constructor & Destructor Documentation

◆ cRandomBGenerator()

GrayLib::cRandomBGenerator::cRandomBGenerator ( const void *  pData,
size_t  iSize 
)

◆ ~cRandomBGenerator()

virtual GrayLib::cRandomBGenerator::~cRandomBGenerator ( )
inlinevirtual

Member Function Documentation

◆ get_RandUns()

UINT GrayLib::cRandomBGenerator::get_RandUns ( )
overridevirtual

generate next random 32 bit number

Reimplemented from Gray::cRandomBase.

◆ InitSeed()

void GrayLib::cRandomBGenerator::InitSeed ( const void *  pData,
size_t  iSize 
)
overridevirtual

initialization

this function initializes the random number generator.

Implements Gray::cRandomBase.

Member Data Documentation

◆ m_p1

int GrayLib::cRandomBGenerator::m_p1
protected

◆ m_p2

int GrayLib::cRandomBGenerator::m_p2
protected

indexes into buffer

◆ m_randbuffer

UINT GrayLib::cRandomBGenerator::m_randbuffer[k_KK]
protected

history buffer


The documentation for this class was generated from the following files: