MultiAgentDecisionProcess
JPPVIndexValuePair Class Reference

JPPVIndexValuePair represents a (JointPolicyPureVector,Value) pair. More...

#include <JPPVIndexValuePair.h>

Inheritance diagram for JPPVIndexValuePair:
[legend]

Public Member Functions

JointPolicyDiscretePureGetJPol ()
 
JointPolicyPureVectorGetJPPV ()
 
 JPPVIndexValuePair (JointPolicyPureVector *jp, double value)
 
 JPPVIndexValuePair (const JointPolicyPureVector &jp, double value)
 
std::string SoftPrint () const
 Softprint the PolicyPoolItemInterface. More...
 
std::string SoftPrintBrief () const
 Softprint the PolicyPoolItemInterface in brief. More...
 
 ~JPPVIndexValuePair ()
 Destructor. More...
 
- Public Member Functions inherited from JointPolicyValuePair
double GetValue () const
 Returns the heuristic value. More...
 
 JointPolicyValuePair (double val)
 (default) Constructor More...
 
JointPolicyValuePairoperator= (const JointPolicyValuePair &o)
 Copy assignment operator. More...
 
 ~JointPolicyValuePair ()
 Destructor. More...
 
- Public Member Functions inherited from PolicyPoolItemInterface
virtual boost::shared_ptr
< JointPolicyDiscretePure
GetJPol () const =0
 Copy assignment operator. More...
 
void Print () const
 Prints a description to stdout. More...
 
void PrintBrief () const
 Prints a brief description to stdout. More...
 
virtual ~PolicyPoolItemInterface ()
 (default) Constructor More...
 

Private Member Functions

void AllocateJPPV ()
 

Private Attributes

JointPolicyPureVector_m_jpol
 
size_t _m_jpolDepth
 
LIndex _m_jpolIndex
 
const
Interface_ProblemToPolicyDiscretePure
_m_pu
 

Detailed Description

JPPVIndexValuePair represents a (JointPolicyPureVector,Value) pair.

It stores the LIndex of the the JointPolicyPureVector.

In contrast, JPPVValuePair maintains a pointer to the JointPolicyPureVector. This class only stores the LIndex of the JointPolicyPureVector, allowing to free memory. Therefore, this class should be preferred over JPPVValuePair when a lot of policies (i.e., policy items) will be retained in memory. E.g., in MAA* like algorithms.

For instance the NewPPI() function in GMAA_MAAstar uses this class (and consequently frees the memory).

Constructor & Destructor Documentation

JPPVIndexValuePair::JPPVIndexValuePair ( JointPolicyPureVector jp,
double  value 
)
JPPVIndexValuePair::JPPVIndexValuePair ( const JointPolicyPureVector jp,
double  value 
)
JPPVIndexValuePair::~JPPVIndexValuePair ( )

Destructor.

References _m_jpol.

Member Function Documentation

void JPPVIndexValuePair::AllocateJPPV ( )
private
JointPolicyDiscretePure * JPPVIndexValuePair::GetJPol ( )

References GetJPPV().

JointPolicyPureVector * JPPVIndexValuePair::GetJPPV ( )

References _m_jpol, and AllocateJPPV().

Referenced by GetJPol().

string JPPVIndexValuePair::SoftPrint ( ) const
virtual
string JPPVIndexValuePair::SoftPrintBrief ( ) const
virtual

Member Data Documentation

JointPolicyPureVector* JPPVIndexValuePair::_m_jpol
private
size_t JPPVIndexValuePair::_m_jpolDepth
private

Referenced by AllocateJPPV(), and JPPVIndexValuePair().

LIndex JPPVIndexValuePair::_m_jpolIndex
private
const Interface_ProblemToPolicyDiscretePure* JPPVIndexValuePair::_m_pu
private

Referenced by AllocateJPPV(), and JPPVIndexValuePair().