MRPT  1.9.9
mrpt::math::CMonteCarlo< T, NUM, OTHER > Class Template Reference

Detailed Description

template<typename T, typename NUM, typename OTHER>
class mrpt::math::CMonteCarlo< T, NUM, OTHER >

Montecarlo simulation for experiments in 1D.

Template arguments are:

  • T: base type, i.e., if an experiment needs to generate random points, then T may be a TPoint3D, and so on.
  • NUM: the numeric type used to represent the error. Usually, double.
  • OTHER: an intermediate type, used especially when testing inverse functions. Leave as int or double if you don't use it.

HOW TO USE THIS CLASS:

  • Create an instance of the class.
  • Refill the "valueGenerator" member with an appropriate function.
  • If your experiment calculates the error directly from the base value, then refill the "errorFun1" member.
  • Otherwise, if your experiment involves the calculation of some value whom with the experimental function is compared, refill "intermediateFun" and "errorFun2".
  • Refill only on of the alternatives.

Definition at line 42 of file CMonteCarlo.h.

#include <mrpt/math/CMonteCarlo.h>

Classes

class  CStatisticalAnalyzer
 

Public Member Functions

 CMonteCarlo ()
 
NUM doExperiment (size_t N, double &time, bool showInWindow=false)
 

Public Attributes

T(* valueGenerator )(mrpt::random::CRandomGenerator &)
 
NUM(* errorFun1 )(const T &)
 
OTHER(* intermediateFun )(const T &)
 
NUM(* errorFun2 )(const T &, const OTHER &)
 

Private Attributes

mrpt::random::CRandomGenerator gen
 

Constructor & Destructor Documentation

◆ CMonteCarlo()

template<typename T , typename NUM , typename OTHER >
mrpt::math::CMonteCarlo< T, NUM, OTHER >::CMonteCarlo ( )
inline

Definition at line 96 of file CMonteCarlo.h.

Member Function Documentation

◆ doExperiment()

template<typename T , typename NUM , typename OTHER >
NUM mrpt::math::CMonteCarlo< T, NUM, OTHER >::doExperiment ( size_t  N,
double &  time,
bool  showInWindow = false 
)
inline

Member Data Documentation

◆ errorFun1

template<typename T , typename NUM , typename OTHER >
NUM(* mrpt::math::CMonteCarlo< T, NUM, OTHER >::errorFun1) (const T &)

◆ errorFun2

template<typename T , typename NUM , typename OTHER >
NUM(* mrpt::math::CMonteCarlo< T, NUM, OTHER >::errorFun2) (const T &, const OTHER &)

◆ gen

template<typename T , typename NUM , typename OTHER >
mrpt::random::CRandomGenerator mrpt::math::CMonteCarlo< T, NUM, OTHER >::gen
private

◆ intermediateFun

template<typename T , typename NUM , typename OTHER >
OTHER(* mrpt::math::CMonteCarlo< T, NUM, OTHER >::intermediateFun) (const T &)

◆ valueGenerator

template<typename T , typename NUM , typename OTHER >
T(* mrpt::math::CMonteCarlo< T, NUM, OTHER >::valueGenerator) (mrpt::random::CRandomGenerator &)



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019