| OpenMS 2.5.0

Public Member Functions | Private Attributes | List of all members
SimRandomNumberGenerator Class Reference
Simulation

Wrapper class for random number generators used by the simulation classes. More...

`#include <OpenMS/SIMULATION/SimTypes.h>`

## Public Member Functions

boost::random::mt19937_64 & | getBiologicalRng ()
boost::random::mt19937_64 & | getTechnicalRng ()
void | setBiologicalRngSeed (unsigned long int seed)
void | setTechnicalRngSeed (unsigned long int seed)
void | initialize (bool biological_random, bool technical_random)
| Initialize the RNGs. More...

## Private Attributes

boost::random::mt19937_64 | biological_rng_
| random number generator for biological variability More...
boost::random::mt19937_64 | technical_rng_
| random number generator for technical variability More...

## Detailed Description

Wrapper class for random number generators used by the simulation classes.

The random numbers are separated two sources of randomness:

- technical random numbers which should represent technical sources of variability like instrument noise and
- biological random numbers which should represent biological sources of variability (e.g. between two samples of the same composition)

## Member Function Documentation

## ◆ getBiologicalRng()

boost::random::mt19937_64& getBiologicalRng | ( |  | ) |

inline

References SimRandomNumberGenerator::biological_rng_.

## ◆ getTechnicalRng()

boost::random::mt19937_64& getTechnicalRng | ( |  | ) |

inline

References SimRandomNumberGenerator::technical_rng_.

## ◆ initialize()

void initialize | ( | bool | biological_random,
|  | bool | technical_random
| ) |  |

inline

Initialize the RNGs.

References SimRandomNumberGenerator::biological_rng_, and SimRandomNumberGenerator::technical_rng_.

## ◆ setBiologicalRngSeed()

void setBiologicalRngSeed | ( | unsigned long int | seed | ) |

inline

References SimRandomNumberGenerator::biological_rng_.

## ◆ setTechnicalRngSeed()

void setTechnicalRngSeed | ( | unsigned long int | seed | ) |

inline

References SimRandomNumberGenerator::technical_rng_.

## Member Data Documentation

## ◆ biological_rng_

boost::random::mt19937_64 biological_rng_

private

random number generator for biological variability

Referenced by SimRandomNumberGenerator::getBiologicalRng(), SimRandomNumberGenerator::initialize(), and SimRandomNumberGenerator::setBiologicalRngSeed().

## ◆ technical_rng_

boost::random::mt19937_64 technical_rng_

private

random number generator for technical variability

Referenced by SimRandomNumberGenerator::getTechnicalRng(), SimRandomNumberGenerator::initialize(), and SimRandomNumberGenerator::setTechnicalRngSeed().