probability-law-simulation.hpp
Go to the documentation of this file.
1 
11 #ifndef SENSORSSIMULATIONPROBABILITYLAWSIMULATIONHPP
12 #define SENSORSSIMULATIONPROBABILITYLAWSIMULATIONHPP
13 
14 #include <random>
15 
16 #include <state-observation/api.h>
18 
19 namespace stateObservation
20 {
21 namespace tools
22 {
23 class STATE_OBSERVATION_DLLAPI ProbabilityLawSimulation
24 {
25 public:
29  static double getGaussianScalar(double std = 1, double bias = 0);
30 
33  template<typename BiasType,
34  typename StdType = Eigen::Matrix<double, BiasType::RowsAtCompileTime, BiasType::RowsAtCompileTime>>
35  static Eigen::Matrix<double, BiasType::RowsAtCompileTime, BiasType::ColsAtCompileTime> getGaussianMatrix(
36  BiasType bias = Eigen::Matrix<double, BiasType::RowsAtCompileTime, BiasType::ColsAtCompileTime>::Zero(),
37  StdType std = Eigen::Matrix<double, BiasType::RowsAtCompileTime, BiasType::RowsAtCompileTime>::Identity(),
40 
46  static double getUniformScalar(double min = -1., double max = 1.);
47 
52  template<typename ReturnType = Matrix>
53  static typename MatrixType<ReturnType>::type getUniformMatrix(Index rows = ReturnType::RowsAtCompileTime,
54  Index cols = ReturnType::ColsAtCompileTime,
55  double min = -1.,
56  double max = 1.);
57 
59  static void setSeed(unsigned int seed);
60 
62  static void setRandomSeed();
63 
64 protected:
65  static const int defaultSeed_;
68  static std::random_device rd_;
69  static std::mt19937 gen_;
70 };
71 #include <state-observation/tools/probability-law-simulation.hxx>
72 } // namespace tools
73 } // namespace stateObservation
74 #endif // SENSORSSIMULATIONPROBABILITYLAWSIMULATIONHPP
stateObservation::MatrixType
Definition: definitions.hpp:71
stateObservation::tools::ProbabilityLawSimulation::gen_
static std::mt19937 gen_
Definition: probability-law-simulation.hpp:69
stateObservation::tools::ProbabilityLawSimulation::ProbabilityLawSimulation
ProbabilityLawSimulation()
Private constructor for preventing instanciation of Probability Law Simulation.
Definition: probability-law-simulation.hpp:67
stateObservation::EigenType
Definition: definitions.hpp:66
stateObservation::tools::ProbabilityLawSimulation::rd_
static std::random_device rd_
Definition: probability-law-simulation.hpp:68
stateObservation::Index
Eigen::Index Index
Definition: definitions.hpp:138
definitions.hpp
Definitions of types and some structures.
stateObservation::tools::ProbabilityLawSimulation
Definition: probability-law-simulation.hpp:23
stateObservation
Definition: bidim-elastic-inv-pendulum-dyn-sys.hpp:20
stateObservation::tools::ProbabilityLawSimulation::defaultSeed_
static const int defaultSeed_
Definition: probability-law-simulation.hpp:65