#include <chaos.h>
Inheritance diagram for chaos:


Public Member Functions | |
| chaos () | |
| constructs a random number generator. does not retrain random seed. | |
| IMPLEMENT_CLASS_NAME ("chaos") | |
| void | retrain () |
| Scrambles the OS's random seed and then provides pseudo-random values. | |
| int | inclusive (int low, int high) const |
| Returns a pseudo-random number r, such that "low" <= r <= "high". | |
| int | exclusive (int low, int high) const |
| Returns a pseudo-random number r, such that "low" < r < "high". | |
This object also re-seeds the underlying system's random seed when retrain() is invoked.
Definition at line 26 of file chaos.h.
| chaos::chaos | ( | ) |
| chaos::IMPLEMENT_CLASS_NAME | ( | "chaos" | ) |
| void chaos::retrain | ( | ) |
Scrambles the OS's random seed and then provides pseudo-random values.
Definition at line 37 of file chaos.cpp.
References LOG, and portable::system_uptime().
| int chaos::inclusive | ( | int | low, | |
| int | high | |||
| ) | const |
Returns a pseudo-random number r, such that "low" <= r <= "high".
Definition at line 64 of file chaos.cpp.
References GET_RAND.
Referenced by hamming::corrupter(), ice_key::encrypt(), formal(), generate_key(), hamming::init_lower_subnet(), hamming::init_upper_subnet(), hamming::init_with_unknown_pattern(), octopus::issue_identity(), istring_sprintf_test(), main(), spocket_tester::perform_test(), broadcast_spocket_tester::perform_test(), nechung_oracle::pick_random(), portable::query_for_process_info(), ssl_init::random_bytes(), random_reposition(), random_seed(), octopus_request_id::randomized_id(), run_test_14(), run_test_32(), run_test_34(), SAFE_STATIC_CONST(), shuffle_list(), standard_sprintf_test(), test_amorph_of(), test_bogon_amorph(), test_byte_array_amorph(), test_recursive_locking(), test_stack_with_objects(), and test_stack_with_pointers().
| int chaos::exclusive | ( | int | low, | |
| int | high | |||
| ) | const |
1.5.1