MultiAgentDecisionProcess
JointBelief Class Reference

JointBelief stores a joint belief, represented as a regular (dense) vector of doubles. More...

#include <JointBelief.h>

Inheritance diagram for JointBelief:
[legend]

Public Member Functions

virtual JointBeliefClone () const
 Returns a pointer to a copy of this class. More...
 
 JointBelief (size_t size=0)
 Constructor which sets the size of the joint belief. More...
 
 JointBelief (const std::vector< double > &belief)
 Constructor which copies belief in this joint belief. More...
 
 JointBelief (const JointBeliefInterface &belief)
 Constructor which copies belief in this joint belief. More...
 
 JointBelief (const StateDistribution &belief)
 
JointBeliefoperator= (const JointBelief &o)
 
JointBeliefInterfaceoperator= (const JointBeliefInterface &o)
 assignment operator. More...
 
double Update (const MultiAgentDecisionProcessDiscreteInterface &pu, Index lastJAI, Index newJOI)
 Performs a joint belief update on this joint belief. More...
 
 ~JointBelief ()
 Destructor. More...
 
- Public Member Functions inherited from JointBeliefInterface
 JointBeliefInterface ()
 (default) Constructor More...
 
virtual ~JointBeliefInterface ()
 Destructor. More...
 
- Public Member Functions inherited from BeliefInterface
 BeliefInterface ()
 (default) Constructor More...
 
virtual ~BeliefInterface ()
 Destructor. More...
 
- Public Member Functions inherited from Belief
 Belief (size_t size=0)
 Constructor which sets the size of the belief. More...
 
 Belief (const std::vector< double > &belief)
 Constructor which copies belief in this belief. More...
 
 Belief (const BeliefInterface &belief)
 Constructor which copies belief in this belief. More...
 
 Belief (const StateDistribution &belief)
 
void Clear ()
 Clears the belief. More...
 
double Get (Index sI) const
 Gets the probability of the sI'th state. More...
 
std::vector< double > Get () const
 Gets a vector of probabilities representing the belief. More...
 
BeliefIteratorGeneric GetIterator () const
 
double InnerProduct (const std::vector< double > &values) const
 Computes the inner product of a belief with the vector values. More...
 
std::vector< double > InnerProduct (const VectorSet &v) const
 Computes the inner product of a belief with the VectorSet v. More...
 
std::vector< double > InnerProduct (const VectorSet &v, const std::vector< bool > &mask) const
 Computes the inner product of a belief with the VectorSet v. More...
 
Beliefoperator= (const Belief &o)
 
BeliefInterfaceoperator= (const BeliefInterface &o)
 Copy assignment operator. More...
 
double & operator[] (Index &i)
 Gets the probability of the i'th state. More...
 
double & operator[] (int &i)
 Gets the probability of the i'th state. More...
 
void Print () const
 Prints the belief. More...
 
bool SanityCheck () const
 Checks whether the belief is a valid probability distribution. More...
 
virtual void Set (const std::vector< double > &belief)
 Copy the belief into this object. More...
 
virtual void Set (Index sI, double prob)
 Sets probability of the sI'th state to prob . More...
 
virtual void Set (const BeliefInterface &belief)
 Copy the belief into this object. More...
 
virtual void Set (const StateDistribution &belief)
 Copy the belief into this object. More...
 
unsigned int Size () const
 Returns the size of this belief. More...
 
std::string SoftPrint () const
 Prints the belief. More...
 
 ~Belief ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from Belief
StateDistributionVector _m_b
 The vector of probability values. More...
 

Detailed Description

JointBelief stores a joint belief, represented as a regular (dense) vector of doubles.

Constructor & Destructor Documentation

JointBelief::JointBelief ( size_t  size = 0)

Constructor which sets the size of the joint belief.

Referenced by Clone().

JointBelief::JointBelief ( const std::vector< double > &  belief)

Constructor which copies belief in this joint belief.

JointBelief::JointBelief ( const JointBeliefInterface belief)

Constructor which copies belief in this joint belief.

JointBelief::JointBelief ( const StateDistribution belief)
JointBelief::~JointBelief ( )

Destructor.

Member Function Documentation

virtual JointBelief* JointBelief::Clone ( ) const
inlinevirtual

Returns a pointer to a copy of this class.

Reimplemented from Belief.

References JointBelief().

JointBelief & JointBelief::operator= ( const JointBelief o)

References Belief::operator=().

JointBeliefInterface & JointBelief::operator= ( const JointBeliefInterface o)
virtual

assignment operator.

This must be implemented by the derived class (with this prototype).

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 .

Implements JointBeliefInterface.

double JointBelief::Update ( const MultiAgentDecisionProcessDiscreteInterface pu,
Index  lastJAI,
Index  newJOI 
)
virtual

Performs a joint belief update on this joint belief.

Performs the belief update. I.e., given the current joint belief b (which is represented by this), we compute P(s'|b, a, o) for all new states s'. This function updates this belief (alter this object). Returned is the normalization factor P(o|b,a), which is also to probability that this new history (belief) occurs given the previous one.

Implements JointBeliefInterface.

References Belief::_m_b, TGet::Get(), MultiAgentDecisionProcessDiscreteInterface::GetEventObservability(), MultiAgentDecisionProcessDiscreteInterface::GetNrStates(), MultiAgentDecisionProcessDiscreteInterface::GetObservationProbability(), MultiAgentDecisionProcessDiscreteInterface::GetTGet(), MultiAgentDecisionProcessDiscreteInterface::GetTransitionProbability(), and Belief::SanityCheck().

Referenced by QBG::ComputeRecursivelyNoCache().