|
MultiAgentDecisionProcess
|
JPPVIndexValuePair represents a (JointPolicyPureVector,Value) pair. More...
#include <JPPVIndexValuePair.h>
Public Member Functions | |
| JointPolicyDiscretePure * | GetJPol () |
| JointPolicyPureVector * | GetJPPV () |
| 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... | |
| JointPolicyValuePair & | operator= (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 |
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).
| JPPVIndexValuePair::JPPVIndexValuePair | ( | JointPolicyPureVector * | jp, |
| double | value | ||
| ) |
References _m_jpol, _m_jpolDepth, _m_jpolIndex, _m_pu, JointPolicy::GetDepth(), and JointPolicyPureVector::GetIndex().
| JPPVIndexValuePair::JPPVIndexValuePair | ( | const JointPolicyPureVector & | jp, |
| double | value | ||
| ) |
References _m_jpol, _m_jpolDepth, _m_jpolIndex, _m_pu, JointPolicy::GetDepth(), and JointPolicyPureVector::GetIndex().
| JPPVIndexValuePair::~JPPVIndexValuePair | ( | ) |
Destructor.
References _m_jpol.
|
private |
References _m_jpol, _m_jpolDepth, _m_jpolIndex, _m_pu, JointPolicyPureVector::SetDepth(), and JointPolicyPureVector::SetIndex().
Referenced by GetJPPV().
| JointPolicyDiscretePure * JPPVIndexValuePair::GetJPol | ( | ) |
References GetJPPV().
| JointPolicyPureVector * JPPVIndexValuePair::GetJPPV | ( | ) |
References _m_jpol, and AllocateJPPV().
Referenced by GetJPol().
|
virtual |
Softprint the PolicyPoolItemInterface.
Implements PolicyPoolItemInterface.
References _m_jpolIndex, and JointPolicyValuePair::GetValue().
|
virtual |
Softprint the PolicyPoolItemInterface in brief.
Implements PolicyPoolItemInterface.
References _m_jpolIndex, and JointPolicyValuePair::GetValue().
|
private |
Referenced by AllocateJPPV(), GetJPPV(), JPPVIndexValuePair(), and ~JPPVIndexValuePair().
|
private |
Referenced by AllocateJPPV(), and JPPVIndexValuePair().
|
private |
Referenced by AllocateJPPV(), JPPVIndexValuePair(), SoftPrint(), and SoftPrintBrief().
|
private |
Referenced by AllocateJPPV(), and JPPVIndexValuePair().