state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
stateObservation::tools::ProbabilityLawSimulation Class Reference

Static Public Member Functions

static double getGaussianScalar (double std=1, double bias=0)
template<typename BiasType, typename StdType = Eigen::Matrix<double, BiasType::RowsAtCompileTime, BiasType::RowsAtCompileTime>>
static Eigen::Matrix< double, BiasType::RowsAtCompileTime, BiasType::ColsAtCompileTime > getGaussianMatrix (BiasType bias=Eigen::Matrix< double, BiasType::RowsAtCompileTime, BiasType::ColsAtCompileTime >::Zero(), StdType std=Eigen::Matrix< double, BiasType::RowsAtCompileTime, BiasType::RowsAtCompileTime >::Identity(), Index rows=Index(EigenType< BiasType >::type::RowsAtCompileTime), Index cols=Index(EigenType< BiasType >::type::ColsAtCompileTime))
static double getUniformScalar (double min=-1., double max=1.)
 Get a scalar following a uniform distribution between min and max.
template<typename ReturnType = Matrix>
static MatrixType< ReturnType >::type getUniformMatrix (Index rows=ReturnType::RowsAtCompileTime, Index cols=ReturnType::ColsAtCompileTime, double min=-1., double max=1.)
 Get a Matrix following a uniform distribution between min and max.
static void setSeed (unsigned int seed)
 sets the seed to the generator
static void setRandomSeed ()
 sets the seed to the generator

Protected Member Functions

 ProbabilityLawSimulation ()
 Private constructor for preventing instanciation of Probability Law Simulation.

Static Protected Attributes

static const int defaultSeed_
static std::random_device rd_
static std::mt19937 gen_

Detailed Description

Definition at line 23 of file probability-law-simulation.hpp.

Constructor & Destructor Documentation

◆ ProbabilityLawSimulation()

stateObservation::tools::ProbabilityLawSimulation::ProbabilityLawSimulation ( )
inlineprotected

Private constructor for preventing instanciation of Probability Law Simulation.

Definition at line 67 of file probability-law-simulation.hpp.

Member Function Documentation

◆ getGaussianScalar()

double stateObservation::tools::ProbabilityLawSimulation::getGaussianScalar ( double std = 1,
double bias = 0 )
static

gets a scalar Gaussian random variable having a given bias and standard deviation(std) default is the cetered unit Gaussian

◆ getGaussianMatrix()

template<typename BiasType, typename StdType = Eigen::Matrix<double, BiasType::RowsAtCompileTime, BiasType::RowsAtCompileTime>>
Eigen::Matrix< double, BiasType::RowsAtCompileTime, BiasType::ColsAtCompileTime > stateObservation::tools::ProbabilityLawSimulation::getGaussianMatrix ( BiasType bias = Eigen::Matrix< double, BiasType::RowsAtCompileTime, BiasType::ColsAtCompileTime >::Zero(),
StdType std = Eigen::Matrix< double, BiasType::RowsAtCompileTime, BiasType::RowsAtCompileTime >::Identity(),
Index rows = Index(EigenType< BiasType >::type::RowsAtCompileTime),
Index cols = Index(EigenType< BiasType >::type::ColsAtCompileTime) )
static

gets vector Gaussian random variable having a given bias and standard deviation(std)

◆ getUniformScalar()

double stateObservation::tools::ProbabilityLawSimulation::getUniformScalar ( double min = -1.,
double max = 1. )
static

Get a scalar following a uniform distribution between min and max.

Parameters
minthe minimal value of the variable
maxthe maximal value of the variable
Returns
double The simulated random variable

◆ getUniformMatrix()

template<typename ReturnType = Matrix>
MatrixType< ReturnType >::type stateObservation::tools::ProbabilityLawSimulation::getUniformMatrix ( Index rows = ReturnType::RowsAtCompileTime,
Index cols = ReturnType::ColsAtCompileTime,
double min = -1.,
double max = 1. )
static

Get a Matrix following a uniform distribution between min and max.

Parameters
minthe minimal value of the variable
maxthe maximal value of the variable

Member Data Documentation

◆ defaultSeed_

const int stateObservation::tools::ProbabilityLawSimulation::defaultSeed_
staticprotected

Definition at line 65 of file probability-law-simulation.hpp.

◆ rd_

std::random_device stateObservation::tools::ProbabilityLawSimulation::rd_
staticprotected

Definition at line 68 of file probability-law-simulation.hpp.

◆ gen_

std::mt19937 stateObservation::tools::ProbabilityLawSimulation::gen_
staticprotected

Definition at line 69 of file probability-law-simulation.hpp.


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