MultiAgentDecisionProcess
Release 0.2.1
|
JPPVIndexValuePair represents a (JointPolicyPureVector,Value) pair. More...
#include <JPPVIndexValuePair.h>
Public Member Functions | |
JointPolicyDiscretePure * | GetJPol () |
Copy assignment operator. | |
JointPolicyPureVector * | GetJPPV () |
JPPVIndexValuePair (JointPolicyPureVector *jp, double value) | |
JPPVIndexValuePair (const JointPolicyPureVector &jp, double value) | |
std::string | SoftPrint () const |
Softprint the PolicyPoolItemInterface. | |
std::string | SoftPrintBrief () const |
Softprint the PolicyPoolItemInterface in brief. | |
~JPPVIndexValuePair () | |
Destructor. | |
![]() | |
double | GetValue () const |
Returns the heuristic value. | |
JointPolicyValuePair (double val) | |
(default) Constructor | |
JointPolicyValuePair & | operator= (const JointPolicyValuePair &o) |
Copy assignment operator. | |
~JointPolicyValuePair () | |
Destructor. | |
![]() | |
void | Print () const |
Prints a description to stdout. | |
void | PrintBrief () const |
Prints a brief description to stdout. | |
virtual | ~PolicyPoolItemInterface () |
(default) Constructor |
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).
Definition at line 54 of file JPPVIndexValuePair.h.
JPPVIndexValuePair::JPPVIndexValuePair | ( | JointPolicyPureVector * | jp, |
double | value | ||
) |
Definition at line 33 of file JPPVIndexValuePair.cpp.
References _m_jpol, _m_jpolDepth, _m_jpolIndex, _m_pu, JointPolicy::GetDepth(), JointPolicyPureVector::GetIndex(), and JointPolicyDiscretePure::GetInterfacePTPDiscretePure().
JPPVIndexValuePair::JPPVIndexValuePair | ( | const JointPolicyPureVector & | jp, |
double | value | ||
) |
Definition at line 43 of file JPPVIndexValuePair.cpp.
References _m_jpol, _m_jpolDepth, _m_jpolIndex, _m_pu, JointPolicy::GetDepth(), JointPolicyPureVector::GetIndex(), and JointPolicyDiscretePure::GetInterfacePTPDiscretePure().
JPPVIndexValuePair::~JPPVIndexValuePair | ( | ) |
|
private |
Definition at line 69 of file JPPVIndexValuePair.cpp.
References _m_jpol, _m_jpolDepth, _m_jpolIndex, _m_pu, JointPolicyPureVector::SetDepth(), and JointPolicyPureVector::SetIndex().
Referenced by GetJPPV().
|
virtual |
Copy assignment operator.
Returns a pointer to the wrapped (partial) joint policy
Implements PolicyPoolItemInterface.
Definition at line 58 of file JPPVIndexValuePair.cpp.
References GetJPPV().
JointPolicyPureVector * JPPVIndexValuePair::GetJPPV | ( | ) |
Definition at line 61 of file JPPVIndexValuePair.cpp.
References _m_jpol, and AllocateJPPV().
Referenced by GetJPol().
|
virtual |
Softprint the PolicyPoolItemInterface.
Implements PolicyPoolItemInterface.
Definition at line 79 of file JPPVIndexValuePair.cpp.
References _m_jpolIndex, and JointPolicyValuePair::GetValue().
|
virtual |
Softprint the PolicyPoolItemInterface in brief.
Implements PolicyPoolItemInterface.
Definition at line 87 of file JPPVIndexValuePair.cpp.
References _m_jpolIndex, and JointPolicyValuePair::GetValue().
|
private |
Definition at line 58 of file JPPVIndexValuePair.h.
Referenced by AllocateJPPV(), GetJPPV(), JPPVIndexValuePair(), and ~JPPVIndexValuePair().
|
private |
Definition at line 60 of file JPPVIndexValuePair.h.
Referenced by AllocateJPPV(), and JPPVIndexValuePair().
|
private |
Definition at line 59 of file JPPVIndexValuePair.h.
Referenced by AllocateJPPV(), JPPVIndexValuePair(), SoftPrint(), and SoftPrintBrief().
|
private |
Definition at line 61 of file JPPVIndexValuePair.h.
Referenced by AllocateJPPV(), and JPPVIndexValuePair().