Auto-seeded random number generator. More...
#include <ash/random.h>

Public Types | |
| typedef T | value_type |
| The type of number generated. | |
Public Member Functions | |
| void | set_range (T min, T max) |
| Change the range of numbers generated. | |
| void | unset_range () |
| Remove range restrictions on generated numbers. | |
| T | operator() () const |
| Generate a random number. | |
| T | operator() (T min, T max) const |
| Generate a random number within a range. | |
| operator T () const | |
| Cast operator - generate and return a random number. | |
Constructors/Destructors | |
We use the default copy constructor. We use the default destructor. | |
| Random () | |
| Default constructor. | |
| Random (T min, T max) | |
| Constructor for a random number within a set range. | |
Auto-seeded random number generator.
| T | The type of number to generate. Also defined as Random::value_type. |
| Global | Use a global seed (true by default). |
| typedef T ash::Random< T, Global, S, I, F >::value_type |
The type of number generated.
Reimplemented in ash::Random< T, Global, 64, true, false >, ash::Random< T, Global, 32, false, true >, ash::Random< T, Global, S, false, true >, and ash::Random< T, Global, S, true, false >.
| ash::Random< T, Global, S, I, F >::Random | ( | ) | [inline] |
Default constructor.
Reimplemented in ash::Random< T, Global, 64, true, false >, ash::Random< T, Global, 32, false, true >, ash::Random< T, Global, S, false, true >, and ash::Random< T, Global, S, true, false >.
| ash::Random< T, Global, S, I, F >::Random | ( | T | min, |
| T | max | ||
| ) | [inline] |
Constructor for a random number within a set range.
| min | The lower bound of the range. |
| max | The upper bound of the range. |
Reimplemented in ash::Random< T, Global, 64, true, false >, ash::Random< T, Global, 32, false, true >, ash::Random< T, Global, S, false, true >, and ash::Random< T, Global, S, true, false >.
| ash::Random< T, Global, S, I, F >::operator T | ( | ) | const [inline] |
Cast operator - generate and return a random number.
Reimplemented in ash::Random< T, Global, 64, true, false >, ash::Random< T, Global, 32, false, true >, ash::Random< T, Global, S, false, true >, and ash::Random< T, Global, S, true, false >.
| T ash::Random< T, Global, S, I, F >::operator() | ( | ) | const [inline] |
Generate a random number.
Reimplemented in ash::Random< T, Global, 64, true, false >, ash::Random< T, Global, 32, false, true >, ash::Random< T, Global, S, false, true >, and ash::Random< T, Global, S, true, false >.
| T ash::Random< T, Global, S, I, F >::operator() | ( | T | min, |
| T | max | ||
| ) | const [inline] |
Generate a random number within a range.
| min | The lower bound of the range. |
| max | The upper bound of the range. |
Reimplemented in ash::Random< T, Global, 64, true, false >, ash::Random< T, Global, 32, false, true >, ash::Random< T, Global, S, false, true >, and ash::Random< T, Global, S, true, false >.
| void ash::Random< T, Global, S, I, F >::set_range | ( | T | min, |
| T | max | ||
| ) | [inline] |
Change the range of numbers generated.
| min | The lower bound of the range. |
| max | The upper bound of the range. |
Reimplemented in ash::Random< T, Global, 64, true, false >, ash::Random< T, Global, 32, false, true >, ash::Random< T, Global, S, false, true >, and ash::Random< T, Global, S, true, false >.
| void ash::Random< T, Global, S, I, F >::unset_range | ( | ) | [inline] |
Remove range restrictions on generated numbers.
Reimplemented in ash::Random< T, Global, 64, true, false >, ash::Random< T, Global, 32, false, true >, ash::Random< T, Global, S, false, true >, and ash::Random< T, Global, S, true, false >.
© 2012
|
Licensed under
|
Hosted by
|
Generated by
1.7.4
|