20 #ifndef __DISCRETE_CONDITIONAL_PDF__ 21 #define __DISCRETE_CONDITIONAL_PDF__ 71 int IndexGet(
const int& input,
const std::vector<int>& condargs)
const;
91 int num_conditional_arguments=1,
92 int cond_arg_dimensions[] = NULL);
107 virtual bool SampleFrom (vector<
Sample<int> >& list_samples,
int num_samples,
int method,
void * args)
const;
110 void ProbabilitySet(
const double& prob,
const int& input,
const std::vector<int>& condargs)
const;
117 #endif // __DISCRETE_CONDITIONAL_PDF__ unsigned int _num_states
number of discrete states
unsigned int NumStatesGet() const
Get the number of discrete states.
int * _cond_arg_dims_p
"Possible discrete states" of all the conditional arguments
virtual ~DiscreteConditionalPdf()
Destructor.
int IndexGet(const int &input, const std::vector< int > &condargs) const
Get the correct index in the row of doubles (double * probability)
DiscreteConditionalPdf(int num_states=1, int num_conditional_arguments=1, int cond_arg_dimensions[]=NULL)
Constructor.
double * _probability_p
Pointer to the probability values.
Abstract Class representing conditional Pdfs P(x | ...)
void ProbabilitySet(const double &prob, const int &input, const std::vector< int > &condargs) const
Set the probability (Typical for discrete Pdf's)
Abstract Class representing all FULLY Discrete Conditional PDF's.
std::vector< double > _valuelist
int _total_dimension
Total dimension of the likelihoodtable.
Probability ProbabilityGet(const int &input) const
Get the probability of a certain argument.
virtual bool SampleFrom(Sample< int > &one_sample, int method, void *args) const
Draw 1 sample from the Pdf:
Class representing a probability (a double between 0 and 1)
std::vector< double > _probs
virtual DiscreteConditionalPdf * Clone() const
Clone function.