Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
ParticleFilter< ParticleT >::DistributionPolicy Class Reference#include <ParticleFilter.h>
Inheritance diagram for ParticleFilter< ParticleT >::DistributionPolicy:
![]() Detailed Descriptiontemplate<typename ParticleT>
A distribution policy provides the ability to randomize ("redistribute") or tweak the values of a group of particles.
|
Public Types | |
typedef ParticleT | particle_type |
redefinition here allows reference to the particle type even if the template parameter may be abstracted away due to a typedef | |
typedef std::vector < particle_type > | particle_collection |
the collection type we'll be using to store the particles | |
typedef particle_collection::size_type | index_t |
index type for refering to particles within the collection | |
Public Member Functions | |
virtual | ~DistributionPolicy () |
destructor | |
virtual void | randomize (particle_type *begin, index_t num)=0 |
This should redistribute the particles over a large area, independently of the particle's current value. | |
virtual void | jiggle (float var, particle_type *begin, index_t num)=0 |
This should slightly modify the particles' state values. |
typedef ParticleT ParticleFilter< ParticleT >::DistributionPolicy::particle_type |
redefinition here allows reference to the particle type even if the template parameter may be abstracted away due to a typedef
Reimplemented in LocalizationParticleDistributionPolicy< ParticleT >.
Definition at line 187 of file ParticleFilter.h.
typedef std::vector<particle_type> ParticleFilter< ParticleT >::DistributionPolicy::particle_collection |
the collection type we'll be using to store the particles
Definition at line 188 of file ParticleFilter.h.
typedef particle_collection::size_type ParticleFilter< ParticleT >::DistributionPolicy::index_t |
index type for refering to particles within the collection
Reimplemented in LocalizationParticleDistributionPolicy< ParticleT >.
Definition at line 189 of file ParticleFilter.h.
virtual ParticleFilter< ParticleT >::DistributionPolicy::~DistributionPolicy | ( | ) | [inline, virtual] |
virtual void ParticleFilter< ParticleT >::DistributionPolicy::randomize | ( | particle_type * | begin, | |
index_t | num | |||
) | [pure virtual] |
This should redistribute the particles over a large area, independently of the particle's current value.
Randomization occurs whenever the particle filter doesn't have any usable particles for replication, either because the particle filter has just been created and doesn't have any information yet, or because new sensor readings have invalidated all of the current particles.
Referenced by ParticleFilter< ParticleT >::LowVarianceResamplingPolicy::resample(), ParticleFilter< ParticleT >::resetFilter(), and ParticleFilter< ParticleT >::resizeParticles().
virtual void ParticleFilter< ParticleT >::DistributionPolicy::jiggle | ( | float | var, | |
particle_type * | begin, | |||
index_t | num | |||
) | [pure virtual] |
This should slightly modify the particles' state values.
var | indicates the scale of the variance desired -- multiply whatever variance you use for modifying each state parameter by this value | |
begin | the first particle in the array | |
num | the number of particles to apply the operation to |
Referenced by ParticleFilter< ParticleT >::LowVarianceResamplingPolicy::resample(), and ParticleFilter< ParticleT >::setPosition().
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:35 2007 by Doxygen 1.5.4 |