MultiAgentDecisionProcess
CPDDiscreteInterface Class Referenceabstract

CPDDiscreteInterface is an abstract base class that represents a conditional probability distribution $ Pr(x|y) $. More...

#include <CPDDiscreteInterface.h>

Inheritance diagram for CPDDiscreteInterface:
[legend]

Public Member Functions

virtual CPDDiscreteInterfaceClone () const =0
 Returns a pointer to a copy of this class. More...
 
virtual double Get (Index x, Index y) const =0
 return the probability $ Pr(x|y) $ of x given y More...
 
virtual Index Sample (Index y) const =0
 Returns an (index of a) x drawn according to $ P(x|y) $. More...
 
virtual void SanityCheck () const =0
 
virtual void Set (Index x, Index y, double p)=0
 set the probability $ Pr(x|y) $ of x given y More...
 
virtual std::string SoftPrint () const =0
 
virtual ~CPDDiscreteInterface ()
 Destructor. More...
 

Detailed Description

CPDDiscreteInterface is an abstract base class that represents a conditional probability distribution $ Pr(x|y) $.

The interface (so far) only implements Get. In the future

  • we may want to add a function that allows multiplication of CPDDiscreteInterface's ?
  • I think it might not be convenient to add Set() functions (each implementation might use different set functions? E.g. a CPD based on rules may use quite a different mechanism to set probabilities than a CPT)

Constructor & Destructor Documentation

virtual CPDDiscreteInterface::~CPDDiscreteInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual CPDDiscreteInterface* CPDDiscreteInterface::Clone ( ) const
pure virtual

Returns a pointer to a copy of this class.

Implemented in CPT, and CPDKroneckerDelta.

Referenced by MultiAgentDecisionProcessDiscreteFactoredStates::RemoveStateFactor().

virtual double CPDDiscreteInterface::Get ( Index  x,
Index  y 
) const
pure virtual

return the probability $ Pr(x|y) $ of x given y

Implemented in CPT, and CPDKroneckerDelta.

virtual Index CPDDiscreteInterface::Sample ( Index  y) const
pure virtual

Returns an (index of a) x drawn according to $ P(x|y) $.

Implemented in CPT, and CPDKroneckerDelta.

virtual void CPDDiscreteInterface::SanityCheck ( ) const
pure virtual

Implemented in CPT, and CPDKroneckerDelta.

virtual void CPDDiscreteInterface::Set ( Index  x,
Index  y,
double  p 
)
pure virtual

set the probability $ Pr(x|y) $ of x given y

Implemented in CPT, and CPDKroneckerDelta.

virtual std::string CPDDiscreteInterface::SoftPrint ( ) const
pure virtual

Implemented in CPT, and CPDKroneckerDelta.