Generates pseudo-random Gaussian noise for simulating the Process.
More...
#include <gaussian_noise.hpp>
Generates pseudo-random Gaussian noise for simulating the Process.
The class GaussiaNoise generates pseudo-random Gaussian noise for simulating the Process within the SimulationEnvironment.
- Author
- Hans Joachim Ferreau, Boris Houska
Definition at line 53 of file gaussian_noise.hpp.
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.
- Parameters
-
[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.
- Parameters
-
[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.
Copy constructor (deep copy).
@param[in] rhs Right-hand side object.
Definition at line 83 of file gaussian_noise.cpp.
GaussianNoise::~GaussianNoise |
( |
| ) |
|
|
virtual |
Clone constructor (deep copy).
\return Pointer to deep copy of base class type
Implements Noise.
Definition at line 109 of file gaussian_noise.cpp.
Clone constructor for a given noise component (deep copy).
@param[in] idx Right-hand side object.
\return Pointer to deep copy of base class type
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.
- Parameters
-
[in] | _mean | Mean value of Gaussian distribution. |
[in] | _variance | Variance of Gaussian distribution. |
- Returns
- Gaussian distributed pseudo-random number
Definition at line 200 of file gaussian_noise.cpp.
const DVector& GaussianNoise::getMean |
( |
| ) |
const |
|
inline |
Returns mean values of the random variable.
\return Mean values of the random variable
const DVector& GaussianNoise::getVariance |
( |
| ) |
const |
|
inline |
Returns variances of the random variable.
\return Variances of the random variable
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.
- Parameters
-
[in] | seed | Seed for pseudo-random number generator. |
- Returns
- SUCCESSFUL_RETURN,
RET_INVALID_NOISE_SETTINGS,
RET_NO_NOISE_SETTINGS
Implements Noise.
Definition at line 132 of file gaussian_noise.cpp.
Assigns new mean value on the component of the random variable with given index.
- Parameters
-
[in] | idx | Index of component. |
[in] | _mean | New mean value. |
- Returns
- SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS
Assigns new mean values to the random variable.
@param[in] _mean New mean value for each component.
\return SUCCESSFUL_RETURN, \n
RET_VECTOR_DIMENSION_MISMATCH
Assigns new mean values to the random variable.
@param[in] _mean New common mean value for all components.
\return SUCCESSFUL_RETURN, \n
RET_INVALID_ARGUMENTS
Assigns new variance on the component of the random variable with given index.
- Parameters
-
[in] | idx | Index of component. |
[in] | _variance | New variance. |
- Returns
- SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS
Assigns new variances to the random variable.
@param[in] _variance New variances for each component.
\return SUCCESSFUL_RETURN, \n
RET_VECTOR_DIMENSION_MISMATCH
returnValue GaussianNoise::setVariances |
( |
double |
_variance | ) |
|
|
inline |
Assigns new variances to the random variable.
@param[in] _variance New common variance for all components.
\return SUCCESSFUL_RETURN, \n
RET_INVALID_ARGUMENTS
Generates a single noise vector based on current internal settings.
@param[out] _w Generated noise vector.
- Returns
- SUCCESSFUL_RETURN,
RET_BLOCK_NOT_READY,
RET_VECTOR_DIMENSION_MISMATCH
Implements Noise.
Definition at line 153 of file gaussian_noise.cpp.
Generates a noise vector sequence based on current internal settings. Noise is generated for each grid point of the VariablesGrid passed.
- Parameters
-
[in,out] | _w | Generated noise vector sequence. |
- Returns
- SUCCESSFUL_RETURN,
RET_BLOCK_NOT_READY,
RET_VECTOR_DIMENSION_MISMATCH
Implements Noise.
Definition at line 174 of file gaussian_noise.cpp.
The documentation for this class was generated from the following files: