ATLAS Offline Software
Classes | Namespaces | Macros | Functions
random.h File Reference

Very simple random numbers for regression testing. More...

#include <stdint.h>
#include <cmath>
Include dependency graph for random.h:
This graph shows which files directly or indirectly include this file:

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

 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. More...
 
float Athena_test::randf_seed (uint32_t &seed, float rmax, float rmin=0)
 Generate a floating-point random number between rmin and rmax. More...
 
int Athena_test::randi_seed (uint32_t &seed, int rmax, int rmin=0)
 Generate an integer random number between rmin and rmax. More...
 
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)
 

Detailed Description

Very simple random numbers for regression testing.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Aug, 2014 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.

Macro Definition Documentation

◆ ATLAS_NOT_REENTRANT

#define ATLAS_NOT_REENTRANT

Definition at line 28 of file random.h.