Bayesian Filtering Library Generated from SVN r
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HistogramFilter< MeasVar > Class Template Reference

Class representing the histogram filter. More...

#include <histogramfilter.h>

Inheritance diagram for HistogramFilter< MeasVar >:
Filter< int, MeasVar >

Public Member Functions

 HistogramFilter (DiscretePdf *prior)
 Constructor.
 
virtual ~HistogramFilter ()
 Destructor.
 
virtual DiscretePdfPostGet ()
 Get Posterior density.
 
virtual void Reset (Pdf< int > *prior)
 Reset Filter.
 
virtual bool Update (SystemModel< int > *const sysmodel, const int &u, MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
 Full Update (system with inputs/sensing params)
 
virtual bool Update (SystemModel< int > *const sysmodel, MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
 Full Update (system without inputs, with sensing params)
 
virtual bool Update (SystemModel< int > *const sysmodel, MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z)
 Full Update (system without inputs/sensing params)
 
virtual bool Update (SystemModel< int > *const sysmodel, const int &u, MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z)
 Full Update (system with inputs, without sensing params)
 
virtual bool Update (SystemModel< int > *const sysmodel, const int &u)
 System Update (system with inputs)
 
virtual bool Update (SystemModel< int > *const sysmodel)
 System Update (system without inputs)
 
virtual bool Update (MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
 Measurement Update (system with "sensing params")
 
virtual bool Update (MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z)
 Measurement Update (system without "sensing params")
 
int TimeStepGet () const
 Get current time.
 

Protected Member Functions

void SysUpdate (SystemModel< int > *const sysmodel, const int &u)
 
void MeasUpdate (MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
 Measurement Update.
 
bool UpdateInternal (SystemModel< int > *const sysmodel, const int &u, MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
 Actual implementation of Update, varies along filters.
 

Protected Attributes

vector< Probability_old_prob
 While updating store list of old probabilities.
 
vector< Probability_new_prob
 While updating store list of new probabilities.
 
Pdf< int > * _prior
 prior Pdf
 
Pdf< int > * _post
 Pointer to the Posterior Pdf.
 
int _timestep
 Represents the current timestep of the filter.
 

Detailed Description

template<typename MeasVar>
class BFL::HistogramFilter< MeasVar >

Class representing the histogram filter.

This is a class representing the histogram filter. A histogram filter is the basic discrete state filter for histogram representations of the state. The implementation is based upon Probabilistic Robotics book of Thrun, Burgard, Fox

@Book{ ThrunBurgardFox2005, author = {Thrun, S. and Burgard, W. and Fox, D.}, title = {Probabilistic Robotics}, publisher = {MIT Press}, year = {2005}, issn_isbn = {0-262-20162-3}, annote = {\url{http://www.probabilistic-robotics.org}}, keywords = {Bayes theory, estimation} } The system of updating the Posterior density is implemented in this class.

Definition at line 49 of file histogramfilter.h.

Constructor & Destructor Documentation

◆ HistogramFilter()

template<typename MeasVar >
HistogramFilter ( DiscretePdf * prior)

Constructor.

Precondition
you created the prior
Parameters
priorpointer to the Discrete Pdf prior density

Member Function Documentation

◆ MeasUpdate()

template<typename MeasVar >
void MeasUpdate ( MeasurementModel< MeasVar, int > *const measmodel,
const MeasVar & z,
const int & s )
protected

Measurement Update.

Update the filter's Posterior density using the sensor measurements, an input and the measurement model.

Parameters
measmodelpointer to the measurement model the filter should use
zsensor measurement
sinput to the system (must be of the same type as u for now, since this was not yet implemented in ConditionalPdf

◆ PostGet()

template<typename MeasVar >
virtual DiscretePdf * PostGet ( )
virtual

Get Posterior density.

Get the current Posterior density

Returns
a pointer to the current posterior

Reimplemented from Filter< int, MeasVar >.

◆ SysUpdate()

template<typename MeasVar >
void SysUpdate ( SystemModel< int > *const sysmodel,
const int & u )
protected

Calculate Discrete filter System Update

Parameters
sysmodelpointer to the system model the filter should use
uinput to the system

◆ TimeStepGet()

int TimeStepGet ( ) const
inherited

Get current time.

Get the current time of the filter

Returns
the current timestep

◆ Update() [1/8]

virtual bool Update ( MeasurementModel< MeasVar, int > *const measmodel,
const MeasVar & z )
virtualinherited

Measurement Update (system without "sensing params")

Parameters
measmodelpointer to the measurement model to use for update
zmeasurement

◆ Update() [2/8]

virtual bool Update ( MeasurementModel< MeasVar, int > *const measmodel,
const MeasVar & z,
const int & s )
virtualinherited

Measurement Update (system with "sensing params")

Parameters
measmodelpointer to the measurement model to use for update
zmeasurement
s"sensing parameter"

◆ Update() [3/8]

virtual bool Update ( SystemModel< int > *const sysmodel)
virtualinherited

System Update (system without inputs)

Parameters
sysmodelpointer to the system model to use for update

◆ Update() [4/8]

virtual bool Update ( SystemModel< int > *const sysmodel,
const int & u )
virtualinherited

System Update (system with inputs)

Parameters
sysmodelpointer to the system model to use for update
uinput to the system

◆ Update() [5/8]

virtual bool Update ( SystemModel< int > *const sysmodel,
const int & u,
MeasurementModel< MeasVar, int > *const measmodel,
const MeasVar & z )
virtualinherited

Full Update (system with inputs, without sensing params)

Parameters
sysmodelpointer to the system model to use for update
uinput to the system
measmodelpointer to the measurement model to use for update
zmeasurement

◆ Update() [6/8]

virtual bool Update ( SystemModel< int > *const sysmodel,
const int & u,
MeasurementModel< MeasVar, int > *const measmodel,
const MeasVar & z,
const int & s )
virtualinherited

Full Update (system with inputs/sensing params)

Parameters
sysmodelpointer to the system model to use for update
uinput to the system
measmodelpointer to the measurement model to use for update
zmeasurement
s"sensing parameter"

◆ Update() [7/8]

virtual bool Update ( SystemModel< int > *const sysmodel,
MeasurementModel< MeasVar, int > *const measmodel,
const MeasVar & z )
virtualinherited

Full Update (system without inputs/sensing params)

Parameters
sysmodelpointer to the system model to use for update
measmodelpointer to the measurement model to use for update
zmeasurement

◆ Update() [8/8]

virtual bool Update ( SystemModel< int > *const sysmodel,
MeasurementModel< MeasVar, int > *const measmodel,
const MeasVar & z,
const int & s )
virtualinherited

Full Update (system without inputs, with sensing params)

Parameters
sysmodelpointer to the system model to use for update
measmodelpointer to the measurement model to use for update
zmeasurement
s"sensing parameter"

◆ UpdateInternal()

template<typename MeasVar >
bool UpdateInternal ( SystemModel< int > *const sysmodel,
const int & u,
MeasurementModel< MeasVar, int > *const measmodel,
const MeasVar & z,
const int & s )
protectedvirtual

Actual implementation of Update, varies along filters.

Parameters
sysmodelpointer to the used system model
uinput param for proposal density
measmodelpointer to the used measurementmodel
zmeasurement param for proposal density
ssensor param for proposal density

Implements Filter< int, MeasVar >.

Member Data Documentation

◆ _new_prob

template<typename MeasVar >
vector<Probability > _new_prob
protected

While updating store list of new probabilities.

Definition at line 68 of file histogramfilter.h.

◆ _old_prob

template<typename MeasVar >
vector<Probability > _old_prob
protected

While updating store list of old probabilities.

Definition at line 66 of file histogramfilter.h.

◆ _post

Pdf<int >* _post
protectedinherited

Pointer to the Posterior Pdf.

The Posterior Pdf represents the subjective belief of the person applying the filter AFTER processing inputs and measurements. A filter does not maintain the beliefs at all timesteps t, since this leads to non-constant (or ever growing if you prefer) memory requirements. However, it is possible, to copy the Posterior density at all timesteps in your application by means of the PostGet() member function

See also
PostGet()

Definition at line 95 of file filter.h.

◆ _prior

Pdf<int >* _prior
protectedinherited

prior Pdf

Definition at line 82 of file filter.h.

◆ _timestep

int _timestep
protectedinherited

Represents the current timestep of the filter.

Todo
Check wether this really belongs here

Definition at line 100 of file filter.h.


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