Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

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

#include <gaussian_noise.hpp>

Inheritance diagram for GaussianNoise:
Inheritance graph
[legend]

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 ()
 
- Public Member Functions inherited from Noise
uint getDim () const
 
BlockStatus getStatus () const
 
BooleanType isEmpty () const
 
 Noise ()
 
 Noise (const Noise &rhs)
 
Noiseoperator= (const Noise &rhs)
 
virtual ~Noise ()
 

Protected Member Functions

double getGaussianRandomNumber (double _mean, double _variance) const
 
- Protected Member Functions inherited from Noise
double getUniformRandomNumber (double _lowerLimit, double _upperLimit) const
 
returnValue setStatus (BlockStatus _status)
 

Protected Attributes

DVector mean
 
DVector variance
 
- Protected Attributes inherited from Noise
BlockStatus status
 
VariablesGrid w
 

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

BEGIN_NAMESPACE_ACADO GaussianNoise::GaussianNoise ( )

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.

GaussianNoise::GaussianNoise ( const GaussianNoise rhs)

Copy constructor (deep copy).

@param[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.

Member Function Documentation

GaussianNoise * GaussianNoise::clone ( ) const
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.

GaussianNoise * GaussianNoise::clone ( uint  idx) const
virtual

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]_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.

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

@param[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.

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.

@param[in] _mean            New mean value for each component.

\return SUCCESSFUL_RETURN, \n
        RET_VECTOR_DIMENSION_MISMATCH
returnValue GaussianNoise::setMeans ( double  _mean)
inline

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

@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
returnValue GaussianNoise::step ( DVector _w)
virtual

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.

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.

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

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.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:24