MultiAgentDecisionProcess
BeliefInterface Class Referenceabstract

BeliefInterface is an interface for beliefs, i.e., probability distributions over the state space. More...

#include <BeliefInterface.h>

Inheritance diagram for BeliefInterface:
[legend]

Public Member Functions

 BeliefInterface ()
 (default) Constructor More...
 
virtual void Clear ()=0
 Clears the belief. More...
 
virtual BeliefInterfaceClone () const =0
 Returns a pointer to a copy of this class. More...
 
virtual double Get (Index sI) const =0
 Gets the probability of the sI'th state. More...
 
virtual std::vector< double > Get () const =0
 Gets a vector of probabilities representing the belief. More...
 
virtual BeliefIteratorGeneric GetIterator () const =0
 
virtual double InnerProduct (const std::vector< double > &values) const =0
 Computes the inner product of a belief with the vector values. More...
 
virtual std::vector< double > InnerProduct (const VectorSet &v) const =0
 Computes the inner product of a belief with the VectorSet v. More...
 
virtual std::vector< double > InnerProduct (const VectorSet &v, const std::vector< bool > &mask) const =0
 Computes the inner product of a belief with the VectorSet v. More...
 
virtual BeliefInterfaceoperator= (const BeliefInterface &o)=0
 Copy assignment operator. More...
 
virtual double & operator[] (Index &i)=0
 Gets the probability of the i'th state. More...
 
virtual double & operator[] (int &i)=0
 Gets the probability of the i'th state. More...
 
virtual void Print () const =0
 Prints the belief. More...
 
virtual bool SanityCheck () const =0
 Checks whether the belief is a valid probability distribution. More...
 
virtual void Set (const StateDistribution &belief)=0
 Copy the belief into this object. More...
 
virtual void Set (const std::vector< double > &belief)=0
 Copy the belief into this object. More...
 
virtual void Set (const BeliefInterface &belief)=0
 Copy the belief into this object. More...
 
virtual void Set (Index sI, double prob)=0
 Sets probability of the sI'th state to prob . More...
 
virtual unsigned int Size () const =0
 Returns the size of this belief. More...
 
virtual std::string SoftPrint () const =0
 Prints the belief. More...
 
virtual ~BeliefInterface ()
 Destructor. More...
 

Detailed Description

BeliefInterface is an interface for beliefs, i.e., probability distributions over the state space.

Constructor & Destructor Documentation

BeliefInterface::BeliefInterface ( )
inline

(default) Constructor

virtual BeliefInterface::~BeliefInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void BeliefInterface::Clear ( )
pure virtual

Clears the belief.

Implemented in BeliefSparse, and Belief.

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

Returns a pointer to a copy of this class.

Implemented in BeliefSparse, Belief, JointBeliefInterface, JointBeliefSparse, JointBeliefEventDriven, and JointBelief.

virtual std::vector<double> BeliefInterface::Get ( ) const
pure virtual

Gets a vector of probabilities representing the belief.

Implemented in BeliefSparse, and Belief.

virtual double BeliefInterface::InnerProduct ( const std::vector< double > &  values) const
pure virtual
virtual std::vector<double> BeliefInterface::InnerProduct ( const VectorSet v) const
pure virtual

Computes the inner product of a belief with the VectorSet v.

Returns the inner product with each vector in v.

Implemented in BeliefSparse, and Belief.

virtual std::vector<double> BeliefInterface::InnerProduct ( const VectorSet v,
const std::vector< bool > &  mask 
) const
pure virtual

Computes the inner product of a belief with the VectorSet v.

Returns the inner product with each vector in v, but only for vectors whose mask is set to true.

Implemented in BeliefSparse, and Belief.

virtual BeliefInterface& BeliefInterface::operator= ( const BeliefInterface o)
pure virtual

Copy assignment operator.

This must be implemented by the derived class (with this prototype). For an example, see PolicyPoolJPolValPair.

For now, this function is purely abstract. Might there be some members added to this (base) class, then an implementation could be made. This should then be called using PolicyPoolInterface::operator=(o) from the copy assignment operator of the derived class. See also http://www.icu-project.org/docs/papers/cpp_report/the_assignment_operator_revisited.html.

Implemented in BeliefSparse, and Belief.

virtual double& BeliefInterface::operator[] ( Index i)
pure virtual

Gets the probability of the i'th state.

Implemented in BeliefSparse, and Belief.

virtual double& BeliefInterface::operator[] ( int &  i)
pure virtual

Gets the probability of the i'th state.

Implemented in BeliefSparse, and Belief.

virtual void BeliefInterface::Print ( ) const
pure virtual
virtual bool BeliefInterface::SanityCheck ( ) const
pure virtual
virtual void BeliefInterface::Set ( const std::vector< double > &  belief)
pure virtual

Copy the belief into this object.

Implemented in BeliefSparse, and Belief.

virtual void BeliefInterface::Set ( const BeliefInterface belief)
pure virtual

Copy the belief into this object.

Implemented in BeliefSparse, and Belief.

virtual void BeliefInterface::Set ( Index  sI,
double  prob 
)
pure virtual

Sets probability of the sI'th state to prob .

Implemented in BeliefSparse, and Belief.

virtual unsigned int BeliefInterface::Size ( ) const
pure virtual
virtual std::string BeliefInterface::SoftPrint ( ) const
pure virtual