Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ParticleFilter< ParticleT >::ResamplingPolicy Class Reference

The resampling policy focuses the particle filter on those particles which are performing well, and dropping those which are poorly rated. More...

#include <ParticleFilter.h>

Inheritance diagram for ParticleFilter< ParticleT >::ResamplingPolicy:

Detailed Description

template<typename ParticleT>
class ParticleFilter< ParticleT >::ResamplingPolicy

The resampling policy focuses the particle filter on those particles which are performing well, and dropping those which are poorly rated.

Resampling should replicate particles proportionally to how well their weights compare to other particles in the filter. The process is similar to a genetic algorithm. This process typically does not vary between applications, so you will probably want to use the supplied LowVarianceResamplingPolicy, and simply tweak parameters as needed.

The ResamplingPolicy interface includes a DistributionPolicy so particles can be randomly generated or modified in an abstract manner.

Definition at line 215 of file ParticleFilter.h.

List of all members.

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

 ResamplingPolicy ()
 constructor, creates a DistributionPolicy based on the particle_type's own DistributionPolicy typedef
 ResamplingPolicy (DistributionPolicy *distPolicy)
 constructor, pass your own custom distribution policy (responsibility for deallocation is assumed by the ResamplingPolicy)
virtual ~ResamplingPolicy ()
 destructor
virtual void resample (particle_collection &particles)=0
 the particle filter will call resample() when the particles have been evaluated and are ready to be selected
virtual void setDistributionPolicy (DistributionPolicy *distPolicy)
 replaces dist with a new distribution policy. If you pass NULL, dist will be reset to the particle_type's default distribution policy, as specified by a 'DistributionPolicy' typedef within the particle class
virtual DistributionPolicygetDistributionPolicy () const
 returns the currently active distribution policy (dist)

Protected Attributes

DistributionPolicydist
 a pointer to the current distribution policy, which cannot be NULL

Private Member Functions

 ResamplingPolicy (const ResamplingPolicy &rp)
 copy unsupported
ResamplingPolicyoperator= (const ResamplingPolicy &rp)
 assignment unsupported

Member Typedef Documentation

template<typename ParticleT>
typedef particle_collection::size_type ParticleFilter< ParticleT >::ResamplingPolicy::index_t

index type for refering to particles within the collection

Definition at line 219 of file ParticleFilter.h.

template<typename ParticleT>
typedef std::vector<particle_type> ParticleFilter< ParticleT >::ResamplingPolicy::particle_collection

the collection type we'll be using to store the particles

Definition at line 218 of file ParticleFilter.h.

template<typename ParticleT>
typedef ParticleT ParticleFilter< ParticleT >::ResamplingPolicy::particle_type

redefinition here allows reference to the particle type even if the template parameter may be abstracted away due to a typedef

Definition at line 217 of file ParticleFilter.h.


Constructor & Destructor Documentation

template<typename ParticleT>
ParticleFilter< ParticleT >::ResamplingPolicy::ResamplingPolicy (  ) 

constructor, creates a DistributionPolicy based on the particle_type's own DistributionPolicy typedef

Definition at line 222 of file ParticleFilter.h.

template<typename ParticleT>
ParticleFilter< ParticleT >::ResamplingPolicy::ResamplingPolicy ( DistributionPolicy distPolicy  )  [explicit]

constructor, pass your own custom distribution policy (responsibility for deallocation is assumed by the ResamplingPolicy)

Definition at line 224 of file ParticleFilter.h.

template<typename ParticleT>
virtual ParticleFilter< ParticleT >::ResamplingPolicy::~ResamplingPolicy (  )  [virtual]

destructor

Definition at line 226 of file ParticleFilter.h.

template<typename ParticleT>
ParticleFilter< ParticleT >::ResamplingPolicy::ResamplingPolicy ( const ResamplingPolicy rp  )  [private]

copy unsupported


Member Function Documentation

template<typename ParticleT>
virtual DistributionPolicy& ParticleFilter< ParticleT >::ResamplingPolicy::getDistributionPolicy (  )  const [virtual]
template<typename ParticleT>
ResamplingPolicy& ParticleFilter< ParticleT >::ResamplingPolicy::operator= ( const ResamplingPolicy rp  )  [private]

assignment unsupported

template<typename ParticleT>
virtual void ParticleFilter< ParticleT >::ResamplingPolicy::resample ( particle_collection particles  )  [pure virtual]

the particle filter will call resample() when the particles have been evaluated and are ready to be selected

Implemented in ParticleFilter< ParticleT >::LowVarianceResamplingPolicy.

Referenced by ParticleFilter< LocalizationParticle >::resample().

template<typename ParticleT>
virtual void ParticleFilter< ParticleT >::ResamplingPolicy::setDistributionPolicy ( DistributionPolicy distPolicy  )  [virtual]

replaces dist with a new distribution policy. If you pass NULL, dist will be reset to the particle_type's default distribution policy, as specified by a 'DistributionPolicy' typedef within the particle class

Definition at line 230 of file ParticleFilter.h.


Member Data Documentation


The documentation for this class was generated from the following file:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:14 2016 by Doxygen 1.6.3