ATLAS Offline Software
Loading...
Searching...
No Matches
Athena_test::URNG Struct Reference

Generator compatible with the C++11 STL UniformRandomNumberGenerator. More...

#include <random.h>

Collaboration diagram for Athena_test::URNG:

Public Types

typedef uint32_t result_type

Public Member Functions

 URNG (uint32_t the_seed=1)
result_type operator() ()

Static Public Member Functions

static constexpr result_type min ()
static constexpr result_type max ()

Public Attributes

uint32_t seed

Detailed Description

Generator compatible with the C++11 STL UniformRandomNumberGenerator.

Definition at line 77 of file random.h.

Member Typedef Documentation

◆ result_type

Definition at line 79 of file random.h.

Constructor & Destructor Documentation

◆ URNG()

Athena_test::URNG::URNG ( uint32_t the_seed = 1)
inline

Definition at line 80 of file random.h.

80: seed(the_seed) {}
uint32_t seed
Definition random.h:84

Member Function Documentation

◆ max()

constexpr result_type Athena_test::URNG::max ( )
inlinestaticconstexpr

Definition at line 82 of file random.h.

82{ return 1000000; }

◆ min()

constexpr result_type Athena_test::URNG::min ( )
inlinestaticconstexpr

Definition at line 81 of file random.h.

81{ return 0; }

◆ operator()()

result_type Athena_test::URNG::operator() ( )
inline

Definition at line 83 of file random.h.

83{ return randi_seed (seed, max()); }
int randi_seed(uint32_t &seed, int rmax, int rmin=0)
Generate an integer random number between rmin and rmax.
Definition random.h:61
static constexpr result_type max()
Definition random.h:82

Member Data Documentation

◆ seed

uint32_t Athena_test::URNG::seed

Definition at line 84 of file random.h.


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