Main MRPT website > C++ reference for MRPT 1.5.6
List of all members | Public Types | Public Member Functions | Public Attributes
mrpt::bayes::CParticleFilterData< T > Class Template Reference

Detailed Description

template<class T>
class mrpt::bayes::CParticleFilterData< T >

This template class declares the array of particles and its internal data, managing some memory-related issues and providing an easy implementation of virtual methods required for implementing a CParticleFilterCapable.

See also the methods in the base class CParticleFilterDataImpl<>.

Since CProbabilityParticle implements all the required operators, the member "m_particles" can be safely copied with "=" or copy constructor operators and new objects will be created internally instead of copying the internal pointers, which would lead to memory corruption.

See Also
CParticleFilter, CParticleFilterCapable, CParticleFilterDataImpl

Definition at line 170 of file CParticleFilterData.h.

#include <mrpt/bayes/CParticleFilterData.h>

Inheritance diagram for mrpt::bayes::CParticleFilterData< T >:
Inheritance graph

Public Types

typedef T CParticleDataContent
 This is the type inside the corresponding CParticleData class. More...
 
typedef CProbabilityParticle< T > CParticleData
 Use this to refer to each element in the m_particles array. More...
 
typedef std::deque< CParticleDataCParticleList
 Use this type to refer to the list of particles m_particles. More...
 

Public Member Functions

 CParticleFilterData ()
 Default constructor. More...
 
void clearParticles ()
 Free the memory of all the particles and reset the array "m_particles" to length zero. More...
 
template<class STREAM >
void writeParticlesToStream (STREAM &out) const
 Dumps the sequence of particles and their weights to a stream (requires T implementing CSerializable). More...
 
template<class STREAM >
void readParticlesFromStream (STREAM &in)
 Reads the sequence of particles and their weights from a stream (requires T implementing CSerializable). More...
 
void getWeights (std::vector< double > &out_logWeights) const
 Returns a vector with the sequence of the logaritmic weights of all the samples. More...
 
const CParticleDatagetMostLikelyParticle () const
 Returns the particle with the highest weight. More...
 

Public Attributes

CParticleList m_particles
 The array of particles. More...
 

Member Typedef Documentation

Use this to refer to each element in the m_particles array.

Definition at line 174 of file CParticleFilterData.h.

template<class T>
typedef T mrpt::bayes::CParticleFilterData< T >::CParticleDataContent

This is the type inside the corresponding CParticleData class.

Definition at line 173 of file CParticleFilterData.h.

template<class T>
typedef std::deque<CParticleData> mrpt::bayes::CParticleFilterData< T >::CParticleList

Use this type to refer to the list of particles m_particles.

Definition at line 175 of file CParticleFilterData.h.

Constructor & Destructor Documentation

template<class T>
mrpt::bayes::CParticleFilterData< T >::CParticleFilterData ( )
inline

Default constructor.

Definition at line 180 of file CParticleFilterData.h.

Member Function Documentation

template<class T>
void mrpt::bayes::CParticleFilterData< T >::clearParticles ( )
inline

Free the memory of all the particles and reset the array "m_particles" to length zero.

Definition at line 183 of file CParticleFilterData.h.

Referenced by mrpt::maps::CMultiMetricMapPDF::getEstimatedPosePDFAtTime(), and mrpt::bayes::CParticleFilterData< CRBPFParticleData >::readParticlesFromStream().

template<class T>
const CParticleData* mrpt::bayes::CParticleFilterData< T >::getMostLikelyParticle ( ) const
inline

Returns the particle with the highest weight.

Definition at line 240 of file CParticleFilterData.h.

Referenced by mrpt::hmtslam::CHMTSLAM::generateLogFiles().

template<class T>
void mrpt::bayes::CParticleFilterData< T >::getWeights ( std::vector< double > &  out_logWeights) const
inline

Returns a vector with the sequence of the logaritmic weights of all the samples.

Definition at line 227 of file CParticleFilterData.h.

Referenced by mrpt::maps::CBeaconMap::internal_insertObservation().

template<class T>
template<class STREAM >
void mrpt::bayes::CParticleFilterData< T >::readParticlesFromStream ( STREAM &  in)
inline

Reads the sequence of particles and their weights from a stream (requires T implementing CSerializable).

See Also
writeParticlesToStream

Definition at line 207 of file CParticleFilterData.h.

template<class T>
template<class STREAM >
void mrpt::bayes::CParticleFilterData< T >::writeParticlesToStream ( STREAM &  out) const
inline

Dumps the sequence of particles and their weights to a stream (requires T implementing CSerializable).

See Also
readParticlesFromStream

Definition at line 192 of file CParticleFilterData.h.

Member Data Documentation

template<class T>
CParticleList mrpt::bayes::CParticleFilterData< T >::m_particles

The array of particles.

Definition at line 177 of file CParticleFilterData.h.

Referenced by mrpt::poses::CPosePDFParticles::append(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::auxiliarComputeObservationLikelihood(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::clearParticles(), mrpt::hmtslam::CHierarchicalMapMHPartition::computeCoordinatesTransformationBetweenNodes(), mrpt::obs::CActionRobotMovement3D::computeFromOdometry_model6DOF(), mrpt::obs::CActionRobotMovement2D::computeFromOdometry_modelThrun(), mrpt::hmtslam::CHierarchicalMapMHPartition::computeOverlapProbabilityBetweenNodes(), mrpt::poses::CPose3DPDFParticles::copyFrom(), mrpt::poses::CPosePDFParticles::copyFrom(), mrpt::poses::CPose3DPDF::createFrom2D(), mrpt::poses::CPoseInterpolatorBase< DIM >::filter(), mrpt::poses::CPosePDFGrid::getCovarianceAndMean(), mrpt::maps::CMultiMetricMapPDF::getEstimatedPosePDFAtTime(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getMostLikelyParticle(), mrpt::hmtslam::CLocalMetricHypothesis::getPoseParticles(), mrpt::hmtslam::CLocalMetricHypothesis::getRelativePose(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getWeights(), mrpt::maps::CBeaconMap::internal_computeObservationLikelihood(), mrpt::maps::CBeaconMap::internal_insertObservation(), mrpt::hmtslam::CHMTSLAM::LSLAM_process_message_from_AA(), mrpt::hmtslam::CHMTSLAM::perform_TLC(), mrpt::opengl::CSetOfObjects::posePDF2opengl(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::prediction_and_update_pfAuxiliaryPFOptimal(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::prediction_and_update_pfOptimalProposal(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::readParticlesFromStream(), mrpt::hmtslam::CLocalMetricHypothesis::updateAreaFromLMH(), and mrpt::bayes::CParticleFilterData< CRBPFParticleData >::writeParticlesToStream().




Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018