Bayesian Filtering Library Generated from SVN r
|
Class representing a mixture of PDFs, the mixture can contain different. More...
#include <mixtureParticleFilter.h>
Public Member Functions | |
Mixture (const unsigned int dimension=0) | |
Constructor: An equal weight is set for all components. | |
template<typename U > | |
Mixture (const U &componentVector) | |
Constructor: An equal weights is set for all components. | |
Mixture (const Mixture &my_mixture) | |
Copy Constructor. | |
virtual | ~Mixture () |
Destructor. | |
virtual Mixture * | Clone () const |
Clone function. | |
unsigned int | NumComponentsGet () const |
Get the number of components. | |
Probability | ProbabilityGet (const T &state) const |
Implementation of virtual base class method. | |
bool | SampleFrom (vector< Sample< T > > &list_samples, const unsigned int num_samples, const SampleMthd method=SampleMthd::DEFAULT, void *args=NULL) const |
Draw multiple samples from the Pdf (overloaded) | |
bool | SampleFrom (Sample< T > &one_sample, const SampleMthd method=SampleMthd::DEFAULT, void *args=NULL) const |
Draw 1 sample from the Pdf: | |
T | ExpectedValueGet () const |
Get the expected value E[x] of the pdf. | |
MatrixWrapper::SymmetricMatrix | CovarianceGet () const |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. | |
vector< Probability > | WeightsGet () const |
Get all component weights. | |
Probability | WeightGet (unsigned int componentNumber) const |
Get the component weight of component "componentNumber". | |
bool | WeightsSet (vector< Probability > &weights) |
Set all component weights. | |
bool | WeightSet (unsigned int componentNumber, Probability w) |
Function to change/set the weigth of a single component. | |
int | MostProbableComponentGet () const |
Get the index of the most probable component, if a few component are. | |
bool | AddComponent (Pdf< T > &pdf) |
Add a component pdf: THIS IS A NON-REALTIME OPERATION. | |
bool | AddComponent (Pdf< T > &pdf, Probability w) |
Add a component pdf with weight w: THIS IS A NON-REALTIME OPERATION. | |
bool | DeleteComponent (unsigned int componentNumber) |
Delete a component pdf: THIS IS A NON_REALTIME OPERATION. | |
vector< Pdf< T > * > | ComponentsGet () const |
Get the vector of pointers to the component pdfs. | |
Pdf< T > * | ComponentGet (unsigned int componentNumber) const |
Get the pointer to the component pdf of component "componentNumber". | |
ColumnVector | ExpectedValueGet () const |
Get the expected value E[x] of the pdf. | |
unsigned int | ExpectedValueGet () const |
Get the expected value E[x] of the pdf. | |
int | ExpectedValueGet () const |
Get the expected value E[x] of the pdf. | |
double | ExpectedValueGet () const |
Get the expected value E[x] of the pdf. | |
unsigned int | DimensionGet () const |
Get the dimension of the argument. | |
unsigned int | DimensionGet () const |
Get the dimension of the argument. | |
unsigned int | DimensionGet () const |
Get the dimension of the argument. | |
virtual void | DimensionSet (unsigned int dim) |
Set the dimension of the argument. | |
virtual void | DimensionSet (unsigned int dim) |
Set the dimension of the argument. | |
virtual void | DimensionSet (unsigned int dim) |
Set the dimension of the argument. | |
Protected Member Functions | |
bool | NormalizeWeights () |
Normalize the component weigths (eg. after setting a component weight) | |
bool | CumWeightsUpdate () |
Updates the cumWeights. | |
void | TestNotInit () const |
Called when a the number of components=0 and if method is called which. | |
Protected Attributes | |
unsigned int | _numComponents |
The number of components. | |
vector< Probability > * | _componentWeights |
Pointer to the vector of mixture weights, the sum of the elements = 1. | |
vector< Pdf< T > * > * | _componentPdfs |
Pointer to the vector of component pdfs. | |
vector< double > | _cumWeights |
Vector containing the cumulative component weights (for efficient sampling) | |
Class representing a mixture of PDFs, the mixture can contain different.
This class is an instantation from the template class Pdf, with added methods to get a set the individual components and mixture weights
Definition at line 48 of file mixtureParticleFilter.h.
Mixture | ( | const unsigned int | dimension = 0 | ) |
Constructor: An equal weight is set for all components.
dimension | the dimension of the state space |
Definition at line 182 of file mixtureParticleFilter.h.
Constructor: An equal weights is set for all components.
componentVector | vector of components (Pdf<T>*) |
Definition at line 199 of file mixtureParticleFilter.h.
Copy Constructor.
Definition at line 226 of file mixtureParticleFilter.h.
|
virtual |
Destructor.
Definition at line 247 of file mixtureParticleFilter.h.
bool AddComponent | ( | Pdf< T > & | ) |
Add a component pdf: THIS IS A NON-REALTIME OPERATION.
Component pdf which will be added |
Definition at line 467 of file mixtureParticleFilter.h.
bool AddComponent | ( | Pdf< T > & | pdf, |
Probability | w ) |
Add a component pdf with weight w: THIS IS A NON-REALTIME OPERATION.
Component pdf which will be added | |
weight | the weight of the new component |
Definition at line 487 of file mixtureParticleFilter.h.
|
virtual |
Pdf< T > * ComponentGet | ( | unsigned int | componentNumber | ) | const |
Get the pointer to the component pdf of component "componentNumber".
componentNumber | number of the component (must be >=0 and <_numComponents) |
Definition at line 540 of file mixtureParticleFilter.h.
vector< Pdf< T > * > ComponentsGet | ( | ) | const |
Get the vector of pointers to the component pdfs.
Definition at line 533 of file mixtureParticleFilter.h.
|
virtual |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
Get first order statistic (Covariance) of this AnalyticPdf
Get first order statistic (Covariance) of this AnalyticPdf
Reimplemented from Pdf< T >.
Definition at line 378 of file mixtureParticleFilter.h.
|
protected |
Updates the cumWeights.
Definition at line 577 of file mixtureParticleFilter.h.
bool DeleteComponent | ( | unsigned int | componentNumber | ) |
Delete a component pdf: THIS IS A NON_REALTIME OPERATION.
componentNumber | number of the component which will be deleted (must be >=0 and <_numComponents) |
Definition at line 507 of file mixtureParticleFilter.h.
|
inlineinherited |
Get the dimension of the argument.
Definition at line 166 of file mixtureParticleFilter.h.
|
inherited |
Get the dimension of the argument.
|
inherited |
Get the dimension of the argument.
|
virtualinherited |
Set the dimension of the argument.
dim | the dimension |
Reimplemented in Gaussian.
Definition at line 172 of file mixtureParticleFilter.h.
|
virtualinherited |
|
virtualinherited |
|
inlinevirtual |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from Pdf< T >.
Definition at line 31 of file mixtureParticleFilter.h.
|
inlinevirtual |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from Pdf< T >.
Definition at line 46 of file mixtureParticleFilter.h.
|
inlinevirtual |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from Pdf< T >.
Definition at line 82 of file mixtureParticleFilter.h.
|
inlinevirtual |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from Pdf< T >.
Definition at line 116 of file mixtureParticleFilter.h.
|
virtual |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from Pdf< T >.
Definition at line 368 of file mixtureParticleFilter.h.
int MostProbableComponentGet | ( | ) | const |
Get the index of the most probable component, if a few component are.
Definition at line 450 of file mixtureParticleFilter.h.
|
protected |
Normalize the component weigths (eg. after setting a component weight)
Definition at line 558 of file mixtureParticleFilter.h.
unsigned int NumComponentsGet | ( | ) | const |
Get the number of components.
Definition at line 268 of file mixtureParticleFilter.h.
|
virtual |
Implementation of virtual base class method.
Reimplemented from Pdf< T >.
Definition at line 274 of file mixtureParticleFilter.h.
|
virtual |
Draw 1 sample from the Pdf:
There's no need to create a list for only 1 sample!
one_sample | sample that will contain result of sampling |
method | Sampling method to be used. Each sampling method is currently represented by an enum, eg. SampleMthd::BOXMULLER |
args | Pointer to a struct representing extra sample arguments |
There's no need to create a list for only 1 sample!
one_sample | sample that will contain result of sampling |
method | Sampling method to be used. Each sampling method is currently represented by an enum, eg. SampleMthd::BOXMULLER |
args | Pointer to a struct representing extra sample arguments |
Reimplemented from Pdf< T >.
Definition at line 339 of file mixtureParticleFilter.h.
|
virtual |
Draw multiple samples from the Pdf (overloaded)
list_samples | list of samples that will contain result of sampling |
num_samples | Number of Samples to be drawn (iid) |
method | Sampling method to be used. Each sampling method is currently represented by an enum eg. SampleMthd::BOXMULLER |
args | Pointer to a struct representing extra sample arguments. "Sample Arguments" can be anything (the number of steps a gibbs-iterator should take, the interval width in MCMC, ... (or nothing), so it is hard to give a meaning to what exactly Sample Arguments should represent... |
list_samples | list of samples that will contain result of sampling |
num_samples | Number of Samples to be drawn (iid) |
method | Sampling method to be used. Each sampling method is currently represented by an enum eg. SampleMthd::BOXMULLER |
args | Pointer to a struct representing extra sample arguments. "Sample Arguments" can be anything (the number of steps a gibbs-iterator should take, the interval width in MCMC, ... (or nothing), so it is hard to give a meaning to what exactly Sample Arguments should represent... |
Reimplemented from Pdf< T >.
Definition at line 286 of file mixtureParticleFilter.h.
|
protected |
Called when a the number of components=0 and if method is called which.
Definition at line 547 of file mixtureParticleFilter.h.
Probability WeightGet | ( | unsigned int | componentNumber | ) | const |
Get the component weight of component "componentNumber".
componentNumber | number of the component (must be >=0 and <_numComponents) |
Definition at line 397 of file mixtureParticleFilter.h.
bool WeightSet | ( | unsigned int | componentNumber, |
Probability | w ) |
Function to change/set the weigth of a single component.
Changes the component weights such that AFTER normalization the weight of the component "componentNumber" is equal to the weight w
componentNumber | number of the component of which the weight will be set (must be >=0 and <_numComponents) |
w | Probability to which the weight of component "componentNumber" will be set (must be <= 1) |
Definition at line 415 of file mixtureParticleFilter.h.
vector< Probability > WeightsGet | ( | ) | const |
Get all component weights.
Definition at line 390 of file mixtureParticleFilter.h.
bool WeightsSet | ( | vector< Probability > & | weights | ) |
Set all component weights.
@weights values vector<Probability> containing the new component weights . The sum of the probabilities of this list is not required to be one since the normalization is automatically carried out. The size of weights should be equal to the number of components
Definition at line 405 of file mixtureParticleFilter.h.
|
protected |
Pointer to the vector of component pdfs.
Definition at line 58 of file mixtureParticleFilter.h.
|
protected |
Pointer to the vector of mixture weights, the sum of the elements = 1.
Definition at line 55 of file mixtureParticleFilter.h.
|
protected |
Vector containing the cumulative component weights (for efficient sampling)
Definition at line 66 of file mixtureParticleFilter.h.
|
protected |
The number of components.
Definition at line 52 of file mixtureParticleFilter.h.