Bayesian Filtering Library
Generated from SVN r
|
23 #include "../wrappers/matrix/vector_wrapper.h"
24 #include "../wrappers/matrix/matrix_wrapper.h"
83 const unsigned int num_samples,
84 const SampleMthd method = SampleMthd::DEFAULT,
85 void * args = NULL)
const;
86 bool SampleFrom (
Sample<int>& one_sample,
const SampleMthd method = SampleMthd::DEFAULT,
void * args = NULL)
const;
105 #endif // DISCRETEPDF_H
bool ProbabilitiesSet(vector< Probability > &values)
Set all probabilities.
Probability ProbabilityGet(const int &state) const
Implementation of virtual base class method.
DiscretePdf(unsigned int num_states=0)
Constructor (dimension = number of classes) An equal probability is set for all classes.
bool ProbabilitySet(int state, Probability a)
Function to change/set the probability of a single state.
vector< Probability > ProbabilitiesGet() const
Get all probabilities.
int MostProbableStateGet()
Get the index of the most probable state.
virtual ~DiscretePdf()
Destructor.
vector< Probability > * _Values_p
Pointer to the discrete PDF-values, the sum of the elements = 1.
unsigned int _num_states
The number of discrete state.
unsigned int NumStatesGet() const
Get the number of discrete States.
bool SampleFrom(vector< Sample< int > > &list_samples, const unsigned int num_samples, const SampleMthd method=SampleMthd::DEFAULT, void *args=NULL) const
Draw multiple samples from the Pdf (overloaded)
vector< double > _CumPDF
STL-vector containing the Cumulative PDF (for efficient sampling)
virtual DiscretePdf * Clone() const
Clone function.
Class representing a probability (a double between 0 and 1)
Class representing a PDF on a discrete variable.
Class PDF: Virtual Base class representing Probability Density Functions.
bool CumPDFUpdate()
Updates the cumPDF.
bool NormalizeProbs()
Normalize all the probabilities (eg. after setting a probability)