Public Member Functions | Private Attributes | List of all members
BFL::ConditionalPdf< Var, CondArg > Class Template Reference

Abstract Class representing conditional Pdfs P(x | ...) More...

#include <conditionalpdf.h>

Inheritance diagram for BFL::ConditionalPdf< Var, CondArg >:
Inheritance graph
[legend]

Public Member Functions

virtual ConditionalPdf< Var, CondArg > * Clone () const
 Clone function. More...
 
const CondArg & ConditionalArgumentGet (unsigned int n_argument) const
 Get the n-th argument of the list. More...
 
virtual void ConditionalArgumentSet (unsigned int n_argument, const CondArg &argument)
 Set the n-th argument of the list. More...
 
const std::vector< CondArg > & ConditionalArgumentsGet () const
 Get the whole list of conditional arguments. More...
 
virtual void ConditionalArgumentsSet (std::vector< CondArg > ConditionalArguments)
 Set the whole list of conditional arguments. More...
 
 ConditionalPdf (int dimension=0, unsigned int num_conditional_arguments=0)
 Constructor. More...
 
unsigned int NumConditionalArgumentsGet () const
 Get the Number of conditional arguments. More...
 
virtual void NumConditionalArgumentsSet (unsigned int numconditionalarguments)
 Set the Number of conditional arguments. More...
 
virtual ~ConditionalPdf ()
 Destructor. More...
 
- Public Member Functions inherited from BFL::BFL::Pdf< Var >
virtual MatrixWrapper::SymmetricMatrix CovarianceGet () const
 Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. More...
 
unsigned int DimensionGet () const
 Get the dimension of the argument. More...
 
virtual void DimensionSet (unsigned int dim)
 Set the dimension of the argument. More...
 
virtual Var ExpectedValueGet () const
 Get the expected value E[x] of the pdf. More...
 
 Pdf (unsigned int dimension=0)
 Constructor. More...
 
virtual Probability ProbabilityGet (const Var &input) const
 Get the probability of a certain argument. More...
 
virtual bool SampleFrom (vector< Sample< Var > > &list_samples, const unsigned int num_samples, int method=DEFAULT, void *args=NULL) const
 Draw multiple samples from the Pdf (overloaded) More...
 
virtual bool SampleFrom (Sample< Var > &one_sample, int method=DEFAULT, void *args=NULL) const
 Draw 1 sample from the Pdf: More...
 
virtual ~Pdf ()
 Destructor. More...
 

Private Attributes

std::vector< CondArg > _ConditionalArguments
 vector containing the values of the conditional args More...
 
unsigned int _NumConditionalArguments
 

of conditional arguments (# of args after the | sign)

More...
 

Detailed Description

template<typename Var, typename CondArg>
class BFL::ConditionalPdf< Var, CondArg >

Abstract Class representing conditional Pdfs P(x | ...)

This class inherits from Pdf Virtual public because of the multiple inheritance that follows Two templates are here to allow a mixture of discrete and continu variables in the Pdf!

Bug:
All conditional arguments should be of the same type T for now!
Todo:
Investigate if we can allow. It is for sure that we'll need another class then the std::list to implement this!
See also
Pdf

Definition at line 49 of file conditionalpdf.h.

Constructor & Destructor Documentation

template<typename Var , typename CondArg >
BFL::ConditionalPdf< Var, CondArg >::ConditionalPdf ( int  dimension = 0,
unsigned int  num_conditional_arguments = 0 
)

Constructor.

Parameters
dimensionint representing the number of rows of the state vector
num_conditional_argumentsthe number of arguments behind the |

Definition at line 116 of file conditionalpdf.h.

template<typename Var , typename CondArg >
BFL::ConditionalPdf< Var, CondArg >::~ConditionalPdf ( )
virtual

Destructor.

Definition at line 124 of file conditionalpdf.h.

Member Function Documentation

template<typename Var , typename CondArg >
ConditionalPdf< Var, CondArg > * BFL::ConditionalPdf< Var, CondArg >::Clone ( ) const
virtual

Clone function.

Implements BFL::BFL::Pdf< Var >.

Reimplemented in BFL::DiscreteConditionalPdf, BFL::LinearAnalyticConditionalGaussian, and BFL::ConditionalGaussian.

Definition at line 129 of file conditionalpdf.h.

template<typename Var , typename CondArg >
const CondArg & BFL::ConditionalPdf< Var, CondArg >::ConditionalArgumentGet ( unsigned int  n_argument) const

Get the n-th argument of the list.

Returns
The current value of the n-th conditional argument (starting from 0!)

Definition at line 165 of file conditionalpdf.h.

template<typename Var , typename CondArg>
void BFL::ConditionalPdf< Var, CondArg >::ConditionalArgumentSet ( unsigned int  n_argument,
const CondArg &  argument 
)
virtual

Set the n-th argument of the list.

Parameters
n_argumentwhich one of the conditional arguments
argumentvalue of the n-th argument

Definition at line 173 of file conditionalpdf.h.

template<typename Var , typename CondArg >
const std::vector< CondArg > & BFL::ConditionalPdf< Var, CondArg >::ConditionalArgumentsGet ( ) const

Get the whole list of conditional arguments.

Returns
an STL-vector containing all the current values of the conditional arguments

Definition at line 152 of file conditionalpdf.h.

template<typename Var , typename CondArg>
void BFL::ConditionalPdf< Var, CondArg >::ConditionalArgumentsSet ( std::vector< CondArg >  ConditionalArguments)
virtual

Set the whole list of conditional arguments.

Parameters
ConditionalArgumentsan STL-vector of type
T
containing the condtional arguments

Definition at line 158 of file conditionalpdf.h.

template<typename Var , typename CondArg >
unsigned int BFL::ConditionalPdf< Var, CondArg >::NumConditionalArgumentsGet ( ) const
inline

Get the Number of conditional arguments.

Returns
the number of conditional arguments

Definition at line 135 of file conditionalpdf.h.

template<typename Var , typename CondArg >
void BFL::ConditionalPdf< Var, CondArg >::NumConditionalArgumentsSet ( unsigned int  numconditionalarguments)
inlinevirtual

Set the Number of conditional arguments.

Parameters
numconditionalargumentsthe number of conditionalarguments
Bug:
will probably give rise to memory allocation problems if you herit from this class and do not redefine this method.

Reimplemented in BFL::LinearAnalyticConditionalGaussian.

Definition at line 141 of file conditionalpdf.h.

Member Data Documentation

template<typename Var, typename CondArg>
std::vector<CondArg> BFL::ConditionalPdf< Var, CondArg >::_ConditionalArguments
private

vector containing the values of the conditional args

Definition at line 110 of file conditionalpdf.h.

template<typename Var, typename CondArg>
unsigned int BFL::ConditionalPdf< Var, CondArg >::_NumConditionalArguments
private

of conditional arguments (# of args after the | sign)

Definition at line 108 of file conditionalpdf.h.


The documentation for this class was generated from the following file:


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Jun 10 2019 12:48:01