Generates pseudo-random Gaussian noise for simulating the Process. More...
#include <gaussian_noise.hpp>

Public Member Functions | |
| virtual GaussianNoise * | clone () const |
| virtual GaussianNoise * | clone (uint idx) const |
| GaussianNoise () | |
| GaussianNoise (const DVector &_mean, const DVector &_variance) | |
| GaussianNoise (uint _dim, double _mean, double _variance) | |
| GaussianNoise (const GaussianNoise &rhs) | |
| const DVector & | getMean () const |
| const DVector & | getVariance () const |
| virtual returnValue | init (uint seed=0) |
| GaussianNoise & | operator= (const GaussianNoise &rhs) |
| returnValue | setMean (uint idx, double _mean) |
| returnValue | setMeans (const DVector &_mean) |
| returnValue | setMeans (double _mean) |
| returnValue | setVariance (uint idx, double _variance) |
| returnValue | setVariances (const DVector &_variance) |
| returnValue | setVariances (double _variance) |
| virtual returnValue | step (DVector &_w) |
| virtual returnValue | step (VariablesGrid &_w) |
| virtual | ~GaussianNoise () |
Protected Member Functions | |
| double | getGaussianRandomNumber (double _mean, double _variance) const |
Protected Attributes | |
| DVector | mean |
| DVector | variance |
Generates pseudo-random Gaussian noise for simulating the Process.
The class GaussiaNoise generates pseudo-random Gaussian noise for simulating the Process within the SimulationEnvironment.
Definition at line 53 of file gaussian_noise.hpp.
Default constructor.
Definition at line 45 of file gaussian_noise.cpp.
| GaussianNoise::GaussianNoise | ( | const DVector & | _mean, |
| const DVector & | _variance | ||
| ) |
Constructor which takes mean value and variance of the random variable. The dimension of these limit vector determine the dimension of the random variable.
| [in] | _mean | Mean value for each component. |
| [in] | _variance | Variance for each component. |
Definition at line 50 of file gaussian_noise.cpp.
| GaussianNoise::GaussianNoise | ( | uint | _dim, |
| double | _mean, | ||
| double | _variance | ||
| ) |
Constructor which takes the dimension of the random variable as well as as common values for the mean value and variance of the random variable.
| [in] | _dim | Dimension of random variable. |
| [in] | _mean | Mean value for each component. |
| [in] | _variance | Variance for each component. |
Definition at line 65 of file gaussian_noise.cpp.
| GaussianNoise::GaussianNoise | ( | const GaussianNoise & | rhs | ) |
Copy constructor (deep copy).
| [in] | rhs | Right-hand side object. |
Definition at line 83 of file gaussian_noise.cpp.
| GaussianNoise::~GaussianNoise | ( | ) | [virtual] |
Destructor.
Definition at line 90 of file gaussian_noise.cpp.
| GaussianNoise * GaussianNoise::clone | ( | ) | const [virtual] |
Clone constructor (deep copy).
Implements Noise.
Definition at line 109 of file gaussian_noise.cpp.
| GaussianNoise * GaussianNoise::clone | ( | uint | idx | ) | const [virtual] |
Clone constructor for a given noise component (deep copy).
| [in] | idx | Right-hand side object. |
Implements Noise.
Definition at line 115 of file gaussian_noise.cpp.
| double GaussianNoise::getGaussianRandomNumber | ( | double | _mean, |
| double | _variance | ||
| ) | const [protected] |
Returns a pseudo-random number based on a Gaussian distribution with given mean and variance.
| [in] | _mean | Mean value of Gaussian distribution. |
| [in] | _variance | Variance of Gaussian distribution. |
Definition at line 200 of file gaussian_noise.cpp.
| const DVector& GaussianNoise::getMean | ( | ) | const [inline] |
Returns mean values of the random variable.
| const DVector& GaussianNoise::getVariance | ( | ) | const [inline] |
Returns variances of the random variable.
| returnValue GaussianNoise::init | ( | uint | seed = 0 | ) | [virtual] |
Initializes noise generation and performs a couple of consistency checks. Initialization of the pseudo-random number generator can be based on a seed in order to allow exact reproduction of generated noise. If seed is not specified (i.e. 0), a seed is obtain from the system clock.
| [in] | seed | Seed for pseudo-random number generator. |
Implements Noise.
Definition at line 132 of file gaussian_noise.cpp.
| GaussianNoise & GaussianNoise::operator= | ( | const GaussianNoise & | rhs | ) |
Assignment Operator (deep copy)
| [in] | rhs | Right-hand side object. |
Definition at line 95 of file gaussian_noise.cpp.
| returnValue GaussianNoise::setMean | ( | uint | idx, |
| double | _mean | ||
| ) | [inline] |
Assigns new mean value on the component of the random variable with given index.
| [in] | idx | Index of component. |
| [in] | _mean | New mean value. |
| returnValue GaussianNoise::setMeans | ( | const DVector & | _mean | ) | [inline] |
Assigns new mean values to the random variable.
| [in] | _mean | New mean value for each component. |
| returnValue GaussianNoise::setMeans | ( | double | _mean | ) | [inline] |
Assigns new mean values to the random variable.
| [in] | _mean | New common mean value for all components. |
| returnValue GaussianNoise::setVariance | ( | uint | idx, |
| double | _variance | ||
| ) | [inline] |
Assigns new variance on the component of the random variable with given index.
| [in] | idx | Index of component. |
| [in] | _variance | New variance. |
| returnValue GaussianNoise::setVariances | ( | const DVector & | _variance | ) | [inline] |
Assigns new variances to the random variable.
| [in] | _variance | New variances for each component. |
| returnValue GaussianNoise::setVariances | ( | double | _variance | ) | [inline] |
Assigns new variances to the random variable.
| [in] | _variance | New common variance for all components. |
| returnValue GaussianNoise::step | ( | DVector & | _w | ) | [virtual] |
Generates a single noise vector based on current internal settings.
| [out] | _w | Generated noise vector. |
Implements Noise.
Definition at line 153 of file gaussian_noise.cpp.
| returnValue GaussianNoise::step | ( | VariablesGrid & | _w | ) | [virtual] |
Generates a noise vector sequence based on current internal settings. Noise is generated for each grid point of the VariablesGrid passed.
| [in,out] | _w | Generated noise vector sequence. |
Implements Noise.
Definition at line 174 of file gaussian_noise.cpp.
DVector GaussianNoise::mean [protected] |
Mean value for each component.
Definition at line 266 of file gaussian_noise.hpp.
DVector GaussianNoise::variance [protected] |
Variance for each component.
Definition at line 267 of file gaussian_noise.hpp.