![]() |
ATLAS Offline Software
|
Very simple random numbers for regression testing. More...
#include <stdint.h>#include <cmath>Go to the source code of this file.
Classes | |
| struct | Athena_test::RNG |
| Generator compatible with the STL RandomNumberGenerator. More... | |
| struct | Athena_test::URNG |
| Generator compatible with the C++11 STL UniformRandomNumberGenerator. More... | |
| class | Athena_test::normal_distribution< T > |
| class | Athena_test::uniform_real_distribution< T > |
Namespaces | |
| namespace | Athena_test |
| functions & macros to test the difference between floats | |
Macros | |
| #define | ATLAS_NOT_REENTRANT |
Functions | |
| uint32_t | Athena_test::rng_seed (uint32_t &seed) |
Generate a random number between 0 and rngmax. | |
| float | Athena_test::randf_seed (uint32_t &seed, float rmax, float rmin=0) |
Generate a floating-point random number between rmin and rmax. | |
| int | Athena_test::randi_seed (uint32_t &seed, int rmax, int rmin=0) |
Generate an integer random number between rmin and rmax. | |
| uint32_t rng | Athena_test::ATLAS_NOT_REENTRANT () |
| int randi | Athena_test::ATLAS_NOT_REENTRANT (int rmax, int rmin=0) |
| float randf | Athena_test::ATLAS_NOT_REENTRANT (float rmax, float rmin=0) |
Variables | |
| static const uint32_t | Athena_test::rngmax = static_cast<uint32_t> (-1) |
| Maximum number generated. | |
| static uint32_t | Athena_test::seed = 1 |
Very simple random numbers for regression testing.
This file provides a few very simple random number generators useful for regression testing. These are 32-bit LCGs, with constants taken from Numerical Recipes. These numbers will have poor quality; however, the results should be completely reproducible across platforms. For regression testing, that's often all that's really needed.
Definition in file random.h.