MRPT  2.0.1
List of all members | Public Types | Public Member Functions | Protected Member Functions
CMyRejectionSampling Class Referenceabstract

Detailed Description

Definition at line 27 of file vision_stereo_rectify/test.cpp.

Inheritance diagram for CMyRejectionSampling:

Public Types

using TParticle = CProbabilityParticle< CPose2D, mrpt::bayes::particle_storage_mode::POINTER >
 

Public Member Functions

void rejectionSampling (size_t desiredSamples, std::vector< TParticle > &outSamples, size_t timeoutTrials=1000)
 Generates a set of N independent samples via rejection sampling. More...
 

Protected Member Functions

void RS_drawFromProposal (CPose2D &outSample) override
 
double RS_observationLikelihood (const CPose2D &x) override
 Returns the NORMALIZED observation likelihood at a given point of the state space (values in the range [0,1]). More...
 
virtual void RS_drawFromProposal (CPose2D &outSample)=0
 Generates one sample, drawing from some proposal distribution. More...
 
virtual double RS_observationLikelihood (const CPose2D &x)=0
 Returns the NORMALIZED observation likelihood (linear, not exponential!!!) at a given point of the state space (values in the range [0,1]). More...
 

Member Typedef Documentation

◆ TParticle

Definition at line 32 of file CRejectionSamplingCapable.h.

Member Function Documentation

◆ rejectionSampling()

void mrpt::bayes::CRejectionSamplingCapable< CPose2D , mrpt::bayes::particle_storage_mode::POINTER >::rejectionSampling ( size_t  desiredSamples,
std::vector< TParticle > &  outSamples,
size_t  timeoutTrials = 1000 
)
inlineinherited

Generates a set of N independent samples via rejection sampling.

Parameters
desiredSamplesThe number of desired samples to generate
outSamplesThe output samples.
timeoutTrialsThe maximum number of rejection trials for each generated sample (i.e. the maximum number of iterations). This can be used to set a limit to the time complexity of the algorithm for difficult probability densities. All will have equal importance weights (a property of rejection sampling), although those samples generated at timeout will have a different importance weights.

Definition at line 48 of file CRejectionSamplingCapable.h.

References ASSERT_, mrpt::random::getRandomGenerator(), MRPT_END, MRPT_START, mrpt::bayes::CRejectionSamplingCapable< TStateSpace, STORAGE >::RS_drawFromProposal(), and mrpt::bayes::CRejectionSamplingCapable< TStateSpace, STORAGE >::RS_observationLikelihood().

◆ RS_drawFromProposal() [1/2]

void CMyRejectionSampling::RS_drawFromProposal ( CPose2D outSample)
inlineoverrideprotected

Definition at line 30 of file vision_stereo_rectify/test.cpp.

◆ RS_drawFromProposal() [2/2]

virtual void mrpt::bayes::CRejectionSamplingCapable< CPose2D , mrpt::bayes::particle_storage_mode::POINTER >::RS_drawFromProposal ( CPose2D &  outSample)
protectedpure virtualinherited

Generates one sample, drawing from some proposal distribution.

◆ RS_observationLikelihood() [1/2]

double CMyRejectionSampling::RS_observationLikelihood ( const CPose2D x)
inlineoverrideprotected

Returns the NORMALIZED observation likelihood at a given point of the state space (values in the range [0,1]).

Definition at line 42 of file vision_stereo_rectify/test.cpp.

◆ RS_observationLikelihood() [2/2]

virtual double mrpt::bayes::CRejectionSamplingCapable< CPose2D , mrpt::bayes::particle_storage_mode::POINTER >::RS_observationLikelihood ( const CPose2D &  x)
protectedpure virtualinherited

Returns the NORMALIZED observation likelihood (linear, not exponential!!!) at a given point of the state space (values in the range [0,1]).




Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020