CYCLUS
Loading...
Searching...
No Matches
cyclus::RandomNumberGenerator Class Reference

Detailed Description

A random number generator.

Definition at line 20 of file random_number_generator.h.

#include <random_number_generator.h>

Public Member Functions

void Initialize (SimInfo si)
 
std::uint32_t random ()
 
double random_01 ()
 
int random_normal_int (double mean, double std_dev, int low=0, int high=std::numeric_limits< int >::max())
 
double random_normal_real (double mean, double std_dev, double low=0, double high=std::numeric_limits< double >::max())
 
int random_uniform_int (int low, int high)
 
double random_uniform_real (double low, double high)
 

Static Public Member Functions

static NormalDist makeNormalDist (double mean, double std_dev, double min, double max)
 

Member Function Documentation

◆ Initialize()

void cyclus::RandomNumberGenerator::Initialize ( SimInfo si)

Initialize from seed.

Definition at line 14 of file random_number_generator.cc.

◆ makeNormalDist()

static NormalDist cyclus::RandomNumberGenerator::makeNormalDist ( double mean,
double std_dev,
double min,
double max )
inlinestatic

Definition at line 59 of file random_number_generator.h.

◆ random()

std::uint32_t cyclus::RandomNumberGenerator::random ( )

Definition at line 21 of file random_number_generator.cc.

◆ random_01()

double cyclus::RandomNumberGenerator::random_01 ( )

wrappers for boost::random distributions

geenerate a random number between [0, 1)

Definition at line 25 of file random_number_generator.cc.

◆ random_normal_int()

int cyclus::RandomNumberGenerator::random_normal_int ( double mean,
double std_dev,
int low = 0,
int high = std::numeric_limits<int>::max() )

generates an integer from a normal distribution, with truncation uses rounding to convert double to int

Definition at line 52 of file random_number_generator.cc.

◆ random_normal_real()

double cyclus::RandomNumberGenerator::random_normal_real ( double mean,
double std_dev,
double low = 0,
double high = std::numeric_limits<double>::max() )

generate a double from a normal distribution, with truncation at low and high

Definition at line 42 of file random_number_generator.cc.

◆ random_uniform_int()

int cyclus::RandomNumberGenerator::random_uniform_int ( int low,
int high )

generate a random integer between [low, high)

Definition at line 30 of file random_number_generator.cc.

◆ random_uniform_real()

double cyclus::RandomNumberGenerator::random_uniform_real ( double low,
double high )

generate a random real number between [low, high)

Definition at line 36 of file random_number_generator.cc.


The documentation for this class was generated from the following files: