#include <mrpt/bayes/CParticleFilterData.h>
Public Types | |
typedef CProbabilityParticle< T > | CParticleData |
Use this to refer to each element in the m_particles array. | |
typedef std::deque< CParticleData > | CParticleList |
Use this type to refer to the list of particles m_particles. | |
Public Member Functions | |
CParticleFilterData () | |
Default constructor. | |
void | clearParticles () |
Free the memory of all the particles and reset the array "m_particles" to length zero. | |
virtual | ~CParticleFilterData () |
Virtual destructor. | |
void | writeParticlesToStream (utils::CStream &out) const |
Dumps the sequence of particles and their weights to a stream (requires T implementing CSerializable). | |
void | readParticlesFromStream (utils::CStream &in) |
Reads the sequence of particles and their weights from a stream (requires T implementing CSerializable). | |
void | getWeights (vector_double &out_logWeights) const |
Returns a vector with the sequence of the logaritmic weights of all the samples. | |
const CParticleData * | getMostLikelyParticle () const |
Returns the particle with the highest weight. | |
Public Attributes | |
CParticleList | m_particles |
The array of particles. |
By adding IMPLEMENT_PARTICLE_FILTER_CAPABLE(T) to the body of the declaration of classes inheriting from both CParticleFilterData and CParticleFilterCapable, the following pure virtual methods are automatically implemented (the param T must be equal to the argument of the template CParticleFilterData).
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.
Definition at line 56 of file CParticleFilterData.h.
typedef CProbabilityParticle<T> mrpt::bayes::CParticleFilterData< T >::CParticleData |
Use this to refer to each element in the m_particles array.
Definition at line 61 of file CParticleFilterData.h.
typedef std::deque<CParticleData> mrpt::bayes::CParticleFilterData< T >::CParticleList |
Use this type to refer to the list of particles m_particles.
Definition at line 65 of file CParticleFilterData.h.
mrpt::bayes::CParticleFilterData< T >::CParticleFilterData | ( | ) | [inline] |
virtual mrpt::bayes::CParticleFilterData< T >::~CParticleFilterData | ( | ) | [inline, virtual] |
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 77 of file CParticleFilterData.h.
Referenced by mrpt::bayes::CParticleFilterData< CRBPFParticleData >::readParticlesFromStream(), and mrpt::bayes::CParticleFilterData< CRBPFParticleData >::~CParticleFilterData().
const CParticleData* mrpt::bayes::CParticleFilterData< T >::getMostLikelyParticle | ( | ) | const [inline] |
Returns the particle with the highest weight.
Reimplemented in mrpt::poses::CPose3DPDFParticles, and mrpt::poses::CPosePDFParticles.
Definition at line 146 of file CParticleFilterData.h.
void mrpt::bayes::CParticleFilterData< T >::getWeights | ( | vector_double & | out_logWeights | ) | const [inline] |
Returns a vector with the sequence of the logaritmic weights of all the samples.
Definition at line 133 of file CParticleFilterData.h.
void mrpt::bayes::CParticleFilterData< T >::readParticlesFromStream | ( | utils::CStream & | in | ) | [inline] |
Reads the sequence of particles and their weights from a stream (requires T implementing CSerializable).
Definition at line 113 of file CParticleFilterData.h.
void mrpt::bayes::CParticleFilterData< T >::writeParticlesToStream | ( | utils::CStream & | out | ) | const [inline] |
Dumps the sequence of particles and their weights to a stream (requires T implementing CSerializable).
Definition at line 99 of file CParticleFilterData.h.
CParticleList mrpt::bayes::CParticleFilterData< T >::m_particles |
The array of particles.
Definition at line 69 of file CParticleFilterData.h.
Referenced by mrpt::bayes::CParticleFilterData< CRBPFParticleData >::clearParticles(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getMostLikelyParticle(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::getWeights(), mrpt::bayes::CParticleFilterData< CRBPFParticleData >::readParticlesFromStream(), and mrpt::bayes::CParticleFilterData< CRBPFParticleData >::writeParticlesToStream().
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:14:51 EST 2009 |