Public Member Functions | Protected Member Functions | Protected Attributes

Generates pseudo-random Gaussian noise for simulating the Process. More...

#include <gaussian_noise.hpp>

Inheritance diagram for GaussianNoise:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual GaussianNoiseclone () const
virtual GaussianNoiseclone (uint idx) const
 GaussianNoise ()
 GaussianNoise (const DVector &_mean, const DVector &_variance)
 GaussianNoise (uint _dim, double _mean, double _variance)
 GaussianNoise (const GaussianNoise &rhs)
const DVectorgetMean () const
const DVectorgetVariance () const
virtual returnValue init (uint seed=0)
GaussianNoiseoperator= (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

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
[in]_meanMean value for each component.
[in]_varianceVariance 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]_dimDimension of random variable.
[in]_meanMean value for each component.
[in]_varianceVariance for each component.

Definition at line 65 of file gaussian_noise.cpp.

Copy constructor (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 83 of file gaussian_noise.cpp.

Destructor.

Definition at line 90 of file gaussian_noise.cpp.


Member Function Documentation

GaussianNoise * GaussianNoise::clone ( ) const [virtual]

Clone constructor (deep copy).

Returns:
Pointer to deep copy of base class type

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).

Parameters:
[in]idxRight-hand side object.
Returns:
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]_meanMean value of Gaussian distribution.
[in]_varianceVariance 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.

Returns:
Mean values of the random variable
const DVector& GaussianNoise::getVariance ( ) const [inline]

Returns variances of the random variable.

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.

Parameters:
[in]seedSeed 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.

GaussianNoise & GaussianNoise::operator= ( const GaussianNoise rhs)

Assignment Operator (deep copy)

Parameters:
[in]rhsRight-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.

Parameters:
[in]idxIndex of component.
[in]_meanNew mean value.
Returns:
SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS
returnValue GaussianNoise::setMeans ( const DVector _mean) [inline]

Assigns new mean values to the random variable.

Parameters:
[in]_meanNew mean value for each component.
Returns:
SUCCESSFUL_RETURN,
RET_VECTOR_DIMENSION_MISMATCH
returnValue GaussianNoise::setMeans ( double  _mean) [inline]

Assigns new mean values to the random variable.

Parameters:
[in]_meanNew common mean value for all components.
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS
returnValue GaussianNoise::setVariance ( uint  idx,
double  _variance 
) [inline]

Assigns new variance on the component of the random variable with given index.

Parameters:
[in]idxIndex of component.
[in]_varianceNew variance.
Returns:
SUCCESSFUL_RETURN,
RET_INDEX_OUT_OF_BOUNDS
returnValue GaussianNoise::setVariances ( const DVector _variance) [inline]

Assigns new variances to the random variable.

Parameters:
[in]_varianceNew variances for each component.
Returns:
SUCCESSFUL_RETURN,
RET_VECTOR_DIMENSION_MISMATCH
returnValue GaussianNoise::setVariances ( double  _variance) [inline]

Assigns new variances to the random variable.

Parameters:
[in]_varianceNew common variance for all components.
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS

Generates a single noise vector based on current internal settings.

Parameters:
[out]_wGenerated 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]_wGenerated 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.


Member Data Documentation

Mean value for each component.

Definition at line 266 of file gaussian_noise.hpp.

Variance for each component.

Definition at line 267 of file gaussian_noise.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:24