feisty meow concerns codebase  2.140
mathematics::chaos Class Reference

a platform-independent way to acquire random numbers in a specific range. More...

#include <chaos.h>

Inheritance diagram for mathematics::chaos:
Collaboration diagram for mathematics::chaos:

Public Member Functions

 chaos ()
 
virtual ~chaos ()
 
 DEFINE_CLASS_NAME ("chaos")
 
void retrain ()
 
int inclusive (int low, int high) const
 < Returns a pseudo-random number r, such that "low" <= r <= "high". More...
 
int exclusive (int low, int high) const
 < Returns a pseudo-random number r, such that "low" < r < "high". More...
 
- Public Member Functions inherited from basis::nameable
virtual const char * class_name () const =0
 Returns the bare name of this class as a constant character pointer. More...
 

Detailed Description

a platform-independent way to acquire random numbers in a specific range.

This object also re-seeds the underlying system's random seed when retrain() is invoked.

Definition at line 50 of file chaos.h.

Constructor & Destructor Documentation

◆ chaos()

mathematics::chaos::chaos ( )
inline

Definition at line 53 of file chaos.h.

References retrain().

◆ ~chaos()

virtual mathematics::chaos::~chaos ( )
inlinevirtual

Definition at line 54 of file chaos.h.

Member Function Documentation

◆ DEFINE_CLASS_NAME()

mathematics::chaos::DEFINE_CLASS_NAME ( "chaos"  )

◆ exclusive()

int mathematics::chaos::exclusive ( int  low,
int  high 
) const
inline

< Returns a pseudo-random number r, such that "low" < r < "high".

Definition at line 98 of file chaos.h.

References GET_32_BIT_RAND_YO.

◆ inclusive()

◆ retrain()

void mathematics::chaos::retrain ( )
inline

Definition at line 58 of file chaos.h.

References basis::environment::system_uptime().

Referenced by chaos().


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