Monte Carlo Pdf: Sample based implementation of Pdf. More...
#include <particlefilter.h>

Public Member Functions | |
| virtual MCPdf< T > * | Clone () const |
| Clone function. | |
| virtual MCPdf< T > * | Clone () const |
| Clone function. | |
| template<> | |
| SymmetricMatrix | CovarianceGet () const |
| Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. | |
| template<> | |
| SymmetricMatrix | CovarianceGet () const |
| Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. | |
| MatrixWrapper::SymmetricMatrix | CovarianceGet () const |
| Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. | |
| MatrixWrapper::SymmetricMatrix | CovarianceGet () const |
| Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. | |
| template<> | |
| SymmetricMatrix | CovarianceGet () const |
| Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. | |
| template<> | |
| SymmetricMatrix | CovarianceGet () const |
| Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. | |
| vector< double > & | CumulativePDFGet () |
| Add a sample to the list. | |
| vector< double > & | CumulativePDFGet () |
| Add a sample to the list. | |
| template<> | |
| ColumnVector | ExpectedValueGet () const |
| Get the expected value E[x] of the pdf. | |
| template<> | |
| ColumnVector | ExpectedValueGet () const |
| Get the expected value E[x] of the pdf. | |
| T | ExpectedValueGet () const |
| Get the expected value E[x] of the pdf. | |
| T | ExpectedValueGet () const |
| Get the expected value E[x] of the pdf. | |
| template<> | |
| unsigned int | ExpectedValueGet () const |
| Get the expected value E[x] of the pdf. | |
| template<> | |
| unsigned int | ExpectedValueGet () const |
| Get the expected value E[x] of the pdf. | |
| const vector< WeightedSample < T > > & | ListOfSamplesGet () const |
| Get the list of weighted samples. | |
| const vector< WeightedSample < T > > & | ListOfSamplesGet () const |
| Get the list of weighted samples. | |
| bool | ListOfSamplesSet (const vector< WeightedSample< T > > &list_of_samples) |
| Set the list of weighted samples. | |
| bool | ListOfSamplesSet (const vector< WeightedSample< T > > &list_of_samples) |
| Set the list of weighted samples. | |
| bool | ListOfSamplesSet (const vector< Sample< T > > &list_of_samples) |
| Overloading: Set the list of Samples (uniform weights) | |
| bool | ListOfSamplesSet (const vector< Sample< T > > &list_of_samples) |
| Overloading: Set the list of Samples (uniform weights) | |
| bool | ListOfSamplesUpdate (const vector< WeightedSample< T > > &list_of_samples) |
| Update the list of samples (overloaded) | |
| bool | ListOfSamplesUpdate (const vector< WeightedSample< T > > &list_of_samples) |
| Update the list of samples (overloaded) | |
| bool | ListOfSamplesUpdate (const vector< Sample< T > > &list_of_samples) |
| Update the list of samples (overloaded) | |
| bool | ListOfSamplesUpdate (const vector< Sample< T > > &list_of_samples) |
| Update the list of samples (overloaded) | |
| template<> | |
| MCPdf (unsigned int num_samples, unsigned int dimension) | |
| template<> | |
| MCPdf (unsigned int num_samples, unsigned int dimension) | |
| template<> | |
| MCPdf (const MCPdf &pdf) | |
| template<> | |
| MCPdf (const MCPdf &pdf) | |
| MCPdf (unsigned int num_samples=0, unsigned int dimension=0) | |
| Constructor. | |
| MCPdf (unsigned int num_samples=0, unsigned int dimension=0) | |
| Constructor. | |
| MCPdf (const MCPdf< T > &) | |
| copy constructor | |
| MCPdf (const MCPdf< T > &) | |
| copy constructor | |
| unsigned int | NumSamplesGet () const |
| Get number of samples. | |
| unsigned int | NumSamplesGet () const |
| Get number of samples. | |
| void | NumSamplesSet (unsigned int num_samples) |
| Set number of samples. | |
| void | NumSamplesSet (unsigned int num_samples) |
| Set number of samples. | |
| bool | SampleFrom (Sample< T > &one_sample, int method=DEFAULT, void *args=NULL) const |
| Draw 1 sample from the Pdf: | |
| bool | SampleFrom (Sample< T > &one_sample, int method=DEFAULT, void *args=NULL) const |
| Draw 1 sample from the Pdf: | |
| bool | SampleFrom (vector< Sample< T > > &list_samples, const unsigned int num_samples, int method=DEFAULT, void *args=NULL) const |
| Draw multiple samples from the Pdf (overloaded) | |
| bool | SampleFrom (vector< Sample< T > > &list_samples, const unsigned int num_samples, int method=DEFAULT, void *args=NULL) const |
| Draw multiple samples from the Pdf (overloaded) | |
| const WeightedSample< T > & | SampleGet (unsigned int i) const |
| Get one sample. | |
| const WeightedSample< T > & | SampleGet (unsigned int i) const |
| Get one sample. | |
| virtual | ~MCPdf () |
| destructor | |
| virtual | ~MCPdf () |
| destructor | |
Protected Member Functions | |
| void | CumPDFUpdate () |
| After updating weights, we have to update the cumPDF. | |
| void | CumPDFUpdate () |
| After updating weights, we have to update the cumPDF. | |
| bool | NormalizeWeights () |
| Normalizing the weights. | |
| bool | NormalizeWeights () |
| Normalizing the weights. | |
| bool | SumWeightsUpdate () |
| STL-iterator for cumulative PDF list. | |
| bool | SumWeightsUpdate () |
| STL-iterator for cumulative PDF list. | |
Protected Attributes | |
| vector< double > | _CumPDF |
| STL-iterator. | |
| vector< WeightedSample< T > > | _listOfSamples |
| STL-list containing the list of samples. | |
| double | _SumWeights |
| Sum of all weights: used for normalising purposes. | |
Private Attributes | |
| SymmetricMatrix | _covariance |
| T | _CumSum |
| T | _diff |
| Matrix | _diffsum |
| vector< WeightedSample< T > >::iterator | _it_los |
| vector< WeightedSample< T > > | _los |
| T | _mean |
Monte Carlo Pdf: Sample based implementation of Pdf.
Class Monte Carlo Pdf: This is a sample based representation of a Pdf P(x), which can both be continu or discrete
Class Monte Carlo Pdf: This is a sample based representation of a Pdf P(x), which can both be continu or discrete
Definition at line 49 of file particlefilter.h.
| BFL::BFL::MCPdf< T >::MCPdf | ( | unsigned int | num_samples = 0, |
| unsigned int | dimension = 0 |
||
| ) |
Constructor.
| num_samples | the number of samples this pdf has |
| dimension | the dimension of these samples. You can use this parameter to avoid runtime memory allocation and |
Definition at line 171 of file particlefilter.h.
| BFL::BFL::MCPdf< T >::~MCPdf | ( | ) | [virtual] |
destructor
Definition at line 195 of file particlefilter.h.
| BFL::BFL::MCPdf< T >::MCPdf | ( | const MCPdf< T > & | ) |
copy constructor
Definition at line 204 of file particlefilter.h.
| BFL::BFL::MCPdf< T >::MCPdf | ( | unsigned int | num_samples = 0, |
| unsigned int | dimension = 0 |
||
| ) |
Constructor.
| num_samples | the number of samples this pdf has |
| dimension | the dimension of these samples. You can use this parameter to avoid runtime memory allocation and |
| virtual BFL::BFL::MCPdf< T >::~MCPdf | ( | ) | [virtual] |
destructor
| BFL::BFL::MCPdf< T >::MCPdf | ( | const MCPdf< T > & | ) |
copy constructor
| BFL::BFL::MCPdf< ColumnVector >::MCPdf | ( | unsigned int | num_samples, |
| unsigned int | dimension | ||
| ) | [inline] |
Definition at line 32 of file particlefilter.h.
| BFL::BFL::MCPdf< ColumnVector >::MCPdf | ( | const MCPdf< T > & | ) | [inline] |
Definition at line 58 of file particlefilter.h.
| BFL::BFL::MCPdf< ColumnVector >::MCPdf | ( | unsigned int | num_samples, |
| unsigned int | dimension | ||
| ) | [inline] |
Definition at line 32 of file particlesmoother.h.
| BFL::BFL::MCPdf< ColumnVector >::MCPdf | ( | const MCPdf< T > & | ) | [inline] |
Definition at line 58 of file particlesmoother.h.
| MCPdf< T > * BFL::BFL::MCPdf< T >::Clone | ( | ) | const [virtual] |
| virtual MCPdf<T>* BFL::BFL::MCPdf< T >::Clone | ( | ) | const [virtual] |
Clone function.
Implements BFL::BFL::Pdf< T >.
| SymmetricMatrix BFL::BFL::MCPdf< ColumnVector >::CovarianceGet | ( | ) | const [inline, virtual] |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
Get first order statistic (Covariance) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 89 of file particlefilter.h.
| SymmetricMatrix BFL::BFL::MCPdf< ColumnVector >::CovarianceGet | ( | ) | const [inline, virtual] |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
Get first order statistic (Covariance) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 89 of file particlesmoother.h.
| MatrixWrapper::SymmetricMatrix BFL::BFL::MCPdf< T >::CovarianceGet | ( | ) | const [virtual] |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
Get first order statistic (Covariance) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 541 of file particlefilter.h.
| MatrixWrapper::SymmetricMatrix BFL::BFL::MCPdf< T >::CovarianceGet | ( | ) | const [virtual] |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
Get first order statistic (Covariance) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
| SymmetricMatrix BFL::BFL::MCPdf< unsigned int >::CovarianceGet | ( | ) | const [inline, virtual] |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
Get first order statistic (Covariance) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 131 of file particlefilter.h.
| SymmetricMatrix BFL::BFL::MCPdf< unsigned int >::CovarianceGet | ( | ) | const [inline, virtual] |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
Get first order statistic (Covariance) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 131 of file particlesmoother.h.
| void BFL::BFL::MCPdf< T >::CumPDFUpdate | ( | ) | [protected] |
After updating weights, we have to update the cumPDF.
Definition at line 510 of file particlefilter.h.
| void BFL::BFL::MCPdf< T >::CumPDFUpdate | ( | ) | [protected] |
After updating weights, we have to update the cumPDF.
| vector< double > & BFL::BFL::MCPdf< T >::CumulativePDFGet | ( | ) |
Add a sample to the list.
| sample | the sample to be added |
Get the Cumulative Pdf
Definition at line 554 of file particlefilter.h.
| vector<double>& BFL::BFL::MCPdf< T >::CumulativePDFGet | ( | ) |
| ColumnVector BFL::BFL::MCPdf< ColumnVector >::ExpectedValueGet | ( | ) | const [inline, virtual] |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 78 of file particlefilter.h.
| ColumnVector BFL::BFL::MCPdf< ColumnVector >::ExpectedValueGet | ( | ) | const [inline, virtual] |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 78 of file particlesmoother.h.
| T BFL::BFL::MCPdf< T >::ExpectedValueGet | ( | ) | const [virtual] |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 529 of file particlefilter.h.
| T BFL::BFL::MCPdf< T >::ExpectedValueGet | ( | ) | const [virtual] |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
| unsigned int BFL::BFL::MCPdf< unsigned int >::ExpectedValueGet | ( | ) | const [inline, virtual] |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 112 of file particlefilter.h.
| unsigned int BFL::BFL::MCPdf< unsigned int >::ExpectedValueGet | ( | ) | const [inline, virtual] |
Get the expected value E[x] of the pdf.
Get low order statistic (Expected Value) of this AnalyticPdf
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 112 of file particlesmoother.h.
| const vector< WeightedSample< T > > & BFL::BFL::MCPdf< T >::ListOfSamplesGet | ( | ) | const |
Get the list of weighted samples.
Definition at line 422 of file particlefilter.h.
| const vector<WeightedSample<T> >& BFL::BFL::MCPdf< T >::ListOfSamplesGet | ( | ) | const |
Get the list of weighted samples.
| bool BFL::BFL::MCPdf< T >::ListOfSamplesSet | ( | const vector< WeightedSample< T > > & | list_of_samples | ) |
Set the list of weighted samples.
| list_of_samples | an STL-list containing the list of all weighted samples |
Definition at line 382 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::ListOfSamplesSet | ( | const vector< WeightedSample< T > > & | list_of_samples | ) |
Set the list of weighted samples.
| list_of_samples | an STL-list containing the list of all weighted samples |
| bool BFL::BFL::MCPdf< T >::ListOfSamplesSet | ( | const vector< Sample< T > > & | list_of_samples | ) |
Overloading: Set the list of Samples (uniform weights)
| list_of_samples | an STL-list containing the list of all samples |
| bool BFL::BFL::MCPdf< T >::ListOfSamplesSet | ( | const vector< Sample< T > > & | list_of_samples | ) |
Overloading: Set the list of Samples (uniform weights)
| list_of_samples | an STL-list containing the list of all samples |
Definition at line 395 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::ListOfSamplesUpdate | ( | const vector< WeightedSample< T > > & | list_of_samples | ) |
Update the list of samples (overloaded)
| list_of_samples | the list of weighted samples |
| bool BFL::BFL::MCPdf< T >::ListOfSamplesUpdate | ( | const vector< WeightedSample< T > > & | list_of_samples | ) |
Update the list of samples (overloaded)
| list_of_samples | the list of weighted samples |
Definition at line 429 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::ListOfSamplesUpdate | ( | const vector< Sample< T > > & | list_of_samples | ) |
Update the list of samples (overloaded)
| list_of_samples | the list of samples |
| bool BFL::BFL::MCPdf< T >::ListOfSamplesUpdate | ( | const vector< Sample< T > > & | list_of_samples | ) |
Update the list of samples (overloaded)
| list_of_samples | the list of samples |
Definition at line 441 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::NormalizeWeights | ( | ) | [protected] |
Normalizing the weights.
| bool BFL::BFL::MCPdf< T >::NormalizeWeights | ( | ) | [protected] |
Normalizing the weights.
Definition at line 492 of file particlefilter.h.
| unsigned int BFL::BFL::MCPdf< T >::NumSamplesGet | ( | ) | const |
Get number of samples.
Definition at line 330 of file particlefilter.h.
| unsigned int BFL::BFL::MCPdf< T >::NumSamplesGet | ( | ) | const |
Get number of samples.
| void BFL::BFL::MCPdf< T >::NumSamplesSet | ( | unsigned int | num_samples | ) |
Set number of samples.
| num_samples | the number of samples offcourse :-) |
| void BFL::BFL::MCPdf< T >::NumSamplesSet | ( | unsigned int | num_samples | ) |
Set number of samples.
| num_samples | the number of samples offcourse :-) |
Definition at line 344 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::SampleFrom | ( | Sample< T > & | one_sample, |
| int | method = DEFAULT, |
||
| void * | args = NULL |
||
| ) | const [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 a #define statement, eg. #define BOXMULLER 1 |
| args | Pointer to a struct representing extra sample arguments |
Reimplemented from BFL::BFL::Pdf< T >.
| bool BFL::BFL::MCPdf< T >::SampleFrom | ( | Sample< T > & | one_sample, |
| int | method = DEFAULT, |
||
| void * | args = NULL |
||
| ) | const [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 a #define statement, eg. #define BOXMULLER 1 |
| args | Pointer to a struct representing extra sample arguments |
Reimplemented from BFL::BFL::Pdf< T >.
Definition at line 295 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::SampleFrom | ( | vector< Sample< T > > & | list_samples, |
| const unsigned int | num_samples, | ||
| int | method = DEFAULT, |
||
| void * | args = NULL |
||
| ) | const [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 a #define statement, eg. #define BOXMULLER 1 |
| 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 BFL::BFL::Pdf< T >.
Definition at line 228 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::SampleFrom | ( | vector< Sample< T > > & | list_samples, |
| const unsigned int | num_samples, | ||
| int | method = DEFAULT, |
||
| void * | args = NULL |
||
| ) | const [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 a #define statement, eg. #define BOXMULLER 1 |
| 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 BFL::BFL::Pdf< T >.
| const WeightedSample<T>& BFL::BFL::MCPdf< T >::SampleGet | ( | unsigned int | i | ) | const |
Get one sample.
| i | the ith sample |
| const WeightedSample< T > & BFL::BFL::MCPdf< T >::SampleGet | ( | unsigned int | i | ) | const |
Get one sample.
| i | the ith sample |
Definition at line 336 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::SumWeightsUpdate | ( | ) | [protected] |
STL-iterator for cumulative PDF list.
After updating weights, we have to recalculate the sum of weights
Definition at line 466 of file particlefilter.h.
| bool BFL::BFL::MCPdf< T >::SumWeightsUpdate | ( | ) | [protected] |
STL-iterator for cumulative PDF list.
After updating weights, we have to recalculate the sum of weights
SymmetricMatrix BFL::BFL::MCPdf< T >::_covariance [mutable, private] |
Definition at line 79 of file particlefilter.h.
vector< double > BFL::BFL::MCPdf< T >::_CumPDF [protected] |
STL-iterator.
STL-list containing the Cumulative PDF (for efficient sampling)
Definition at line 60 of file particlefilter.h.
T BFL::BFL::MCPdf< T >::_CumSum [mutable, private] |
Definition at line 75 of file particlefilter.h.
T BFL::BFL::MCPdf< T >::_diff [mutable, private] |
Definition at line 78 of file particlefilter.h.
Matrix BFL::BFL::MCPdf< T >::_diffsum [mutable, private] |
Definition at line 80 of file particlefilter.h.
vector< WeightedSample< T > >::iterator BFL::BFL::MCPdf< T >::_it_los [mutable, private] |
Definition at line 81 of file particlefilter.h.
vector< WeightedSample< T > > BFL::BFL::MCPdf< T >::_listOfSamples [protected] |
STL-list containing the list of samples.
Definition at line 56 of file particlefilter.h.
vector< WeightedSample< T > > BFL::BFL::MCPdf< T >::_los [mutable, private] |
Definition at line 76 of file particlefilter.h.
T BFL::BFL::MCPdf< T >::_mean [mutable, private] |
Definition at line 77 of file particlefilter.h.
double BFL::BFL::MCPdf< T >::_SumWeights [protected] |
Sum of all weights: used for normalising purposes.
Definition at line 54 of file particlefilter.h.