MultiAgentDecisionProcess  Release 0.2.1
BeliefInterface Class Reference

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

#include <BeliefInterface.h>

+ Inheritance diagram for BeliefInterface:

Public Member Functions

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

Detailed Description

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

Definition at line 42 of file BeliefInterface.h.

Constructor & Destructor Documentation

BeliefInterface::BeliefInterface ( )
inline

(default) Constructor

Definition at line 51 of file BeliefInterface.h.

virtual BeliefInterface::~BeliefInterface ( )
inlinevirtual

Destructor.

Definition at line 54 of file BeliefInterface.h.

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, 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

Checks whether the belief is a valid probability distribution.

Implemented in BeliefSparse, and Belief.

Referenced by PlanningUnitMADPDiscrete::GetJointBeliefInterface(), and AlphaVectorPlanning::SampleBeliefs().

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

Returns the size of this belief.

Implemented in BeliefSparse, and Belief.

Referenced by Belief::Belief(), AlphaVectorBG::BeliefBackup(), MDPSolver::GetQ(), Belief::Set(), and BeliefSparse::Set().

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

Prints the belief.

Implemented in BeliefSparse, IndividualBeliefJESP, and Belief.

Referenced by QPOMDP::ComputeRecursively(), and AgentBG::GetMaximizingBGIndex().


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