30 #ifndef __CONDITIONAL_PDF__ 31 #define __CONDITIONAL_PDF__ 58 ConditionalPdf(
int dimension=0,
unsigned int num_conditional_arguments=0);
115 template<
typename Var,
typename CondArg>
123 template<
typename Var,
typename CondArg>
128 template<
typename Var,
typename CondArg>
134 template<
typename Var,
typename CondArg>
inline unsigned int 137 return _NumConditionalArguments;
140 template<
typename Var,
typename CondArg>
inline void 143 if (numconditionalarguments != _NumConditionalArguments)
145 _NumConditionalArguments = numconditionalarguments;
146 this->_ConditionalArguments.resize(_NumConditionalArguments);
151 template<
typename Var,
typename CondArg>
const std::vector<CondArg>&
154 return _ConditionalArguments;
157 template<
typename Var,
typename CondArg>
void 160 assert (condargs.size() == _NumConditionalArguments);
161 this->_ConditionalArguments = condargs;
164 template<
typename Var,
typename CondArg>
const CondArg&
167 assert( n_argument < _NumConditionalArguments );
169 return _ConditionalArguments[n_argument];
172 template<
typename Var,
typename CondArg>
void 174 const CondArg& argument)
176 assert ( n_argument < _NumConditionalArguments );
178 this->_ConditionalArguments[n_argument]= argument;
182 #endif // __CONDITIONAL_PDF__ virtual void NumConditionalArgumentsSet(unsigned int numconditionalarguments)
Set the Number of conditional arguments.
Class PDF: Virtual Base class representing Probability Density Functions.
std::vector< CondArg > _ConditionalArguments
vector containing the values of the conditional args
const CondArg & ConditionalArgumentGet(unsigned int n_argument) const
Get the n-th argument of the list.
virtual void ConditionalArgumentsSet(std::vector< CondArg > ConditionalArguments)
Set the whole list of conditional arguments.
unsigned int _NumConditionalArguments
of conditional arguments (# of args after the | sign)
virtual void ConditionalArgumentSet(unsigned int n_argument, const CondArg &argument)
Set the n-th argument of the list.
virtual ~ConditionalPdf()
Destructor.
const std::vector< CondArg > & ConditionalArgumentsGet() const
Get the whole list of conditional arguments.
Abstract Class representing conditional Pdfs P(x | ...)
virtual ConditionalPdf< Var, CondArg > * Clone() const
Clone function.
unsigned int NumConditionalArgumentsGet() const
Get the Number of conditional arguments.
ConditionalPdf(int dimension=0, unsigned int num_conditional_arguments=0)
Constructor.