|
MultiAgentDecisionProcess
|
BGIPSolution represents a solution for BayesianGameIdenticalPayoff. More...
#include <BGIPSolution.h>
Public Member Functions | |
| void | AddSolution (const JointPolicyPureVector &jp, double value) |
| Adds a JPPVValuePair to the priority queue that maintains the best _m_nrSolutions solutions. More... | |
| void | AddSolution (const JointPolicyPureVectorForClusteredBG &jp, double value) |
| void | AddSolution (LIndex jpolIndex, double value) |
| BGIPSolution (const Interface_ProblemToPolicyDiscretePure *pu, size_t nrDesiredSolutions=1) | |
| (default) Constructor More... | |
| BGIPSolution (const I_PtPDpure_constPtr &pu, size_t nrDesiredSolutions=1) | |
| const boost::shared_ptr < JointPolicy > | GetJointPolicy () const |
| const JointPolicyPureVector & | GetJointPolicyPureVector () const |
| const JointPolicyPureVectorForClusteredBG & | GetJointPolicyPureVectorForClusteredBG () const |
| boost::shared_ptr< JPPVValuePair > | GetNextSolutionJPPV () const |
| boost::shared_ptr < PartialJPDPValuePair > | GetNextSolutionPJPDP () const |
| size_t | GetNrDesiredSolutions () const |
| size_t | GetNrFoundSolutions () const |
| double | GetPayoff () const |
| bool | IsEmptyJPPV () const |
| bool | IsEmptyPJPDP () const |
| void | Load (const std::string &filename) |
| void | PopNextSolutionJPPV () |
| void | PopNextSolutionPJPDP () |
| void | Print () const |
| void | Save (const std::string &filename) const |
| void | SetNrDesiredSolutions (size_t n) |
| std::string | SoftPrint () const |
| ~BGIPSolution () | |
| Destructor. More... | |
Protected Member Functions | |
| void | GiveOverFlowWarning () |
Private Attributes | |
| bool | _m_issuedOverFlowWarning |
| std::set< LIndex > | _m_jpolIndices |
| size_t | _m_nrDesiredSolutions |
| This variable gives the number of solutions to return (k). More... | |
| const Interface_ProblemToPolicyDiscretePure * | _m_pu |
| I_PtPDpure_constPtr | _m_puShared |
| FixedCapacityPriorityQueue < boost::shared_ptr < JPPVValuePair > > | _m_qFixedK |
| if we want to return the best k solutions, we store them in a priority queue. More... | |
| std::priority_queue < boost::shared_ptr < JPPVValuePair > > * | _m_qInfSize |
| FixedCapacityPriorityQueue < boost::shared_ptr < PartialJPDPValuePair > > | _m_qpFixedK |
| std::priority_queue < boost::shared_ptr < PartialJPDPValuePair > > * | _m_qpInfSize |
| bool | _m_useFixedCapacityPriorityQueue |
| whether we use the fixed capacity priority queue More... | |
BGIPSolution represents a solution for BayesianGameIdenticalPayoff.
| BGIPSolution::BGIPSolution | ( | const Interface_ProblemToPolicyDiscretePure * | pu, |
| size_t | nrDesiredSolutions = 1 |
||
| ) |
(default) Constructor
References _m_nrDesiredSolutions, and SetNrDesiredSolutions().
| BGIPSolution::BGIPSolution | ( | const I_PtPDpure_constPtr & | pu, |
| size_t | nrDesiredSolutions = 1 |
||
| ) |
References _m_nrDesiredSolutions, and SetNrDesiredSolutions().
| BGIPSolution::~BGIPSolution | ( | ) |
Destructor.
References _m_qFixedK, _m_qInfSize, _m_qpFixedK, _m_qpInfSize, FixedCapacityPriorityQueue< T, _Compare >::empty(), FixedCapacityPriorityQueue< T, _Compare >::pop(), and SoftPrint().
| void BGIPSolution::AddSolution | ( | const JointPolicyPureVector & | jp, |
| double | value | ||
| ) |
Adds a JPPVValuePair to the priority queue that maintains the best _m_nrSolutions solutions.
Any old solutions that are no longer needed are automatically deleted.
References _m_jpolIndices, _m_qFixedK, _m_qInfSize, _m_useFixedCapacityPriorityQueue, Globals::CastLIndexToIndex(), JointPolicyPureVector::GetIndex(), GiveOverFlowWarning(), and FixedCapacityPriorityQueue< T, _Compare >::insert().
Referenced by AddSolution(), and BayesianGameIdenticalPayoffSolver::AddSolution().
| void BGIPSolution::AddSolution | ( | const JointPolicyPureVectorForClusteredBG & | jp, |
| double | value | ||
| ) |
| void BGIPSolution::AddSolution | ( | LIndex | jpolIndex, |
| double | value | ||
| ) |
References _m_pu, _m_puShared, AddSolution(), and JointPolicyPureVector::SetIndex().
| const boost::shared_ptr< JointPolicy > BGIPSolution::GetJointPolicy | ( | void | ) | const |
| const JointPolicyPureVector & BGIPSolution::GetJointPolicyPureVector | ( | void | ) | const |
| const JointPolicyPureVectorForClusteredBG & BGIPSolution::GetJointPolicyPureVectorForClusteredBG | ( | ) | const |
| boost::shared_ptr< JPPVValuePair > BGIPSolution::GetNextSolutionJPPV | ( | ) | const |
| boost::shared_ptr< PartialJPDPValuePair > BGIPSolution::GetNextSolutionPJPDP | ( | ) | const |
|
inline |
References _m_nrDesiredSolutions.
Referenced by BayesianGameIdenticalPayoffSolver::GetNrDesiredSolutions().
| size_t BGIPSolution::GetNrFoundSolutions | ( | ) | const |
| double BGIPSolution::GetPayoff | ( | ) | const |
References _m_qFixedK, _m_qInfSize, _m_qpFixedK, _m_qpInfSize, _m_useFixedCapacityPriorityQueue, FixedCapacityPriorityQueue< T, _Compare >::size(), and FixedCapacityPriorityQueue< T, _Compare >::top().
Referenced by BayesianGameIdenticalPayoffSolver::GetExpectedReward(), BayesianGameIdenticalPayoffSolver::GetPayoff(), and SoftPrint().
|
inlineprotected |
Referenced by AddSolution().
| bool BGIPSolution::IsEmptyJPPV | ( | ) | const |
References _m_qFixedK, _m_qInfSize, _m_useFixedCapacityPriorityQueue, and FixedCapacityPriorityQueue< T, _Compare >::empty().
Referenced by BayesianGameIdenticalPayoffSolver::IsEmptyJPPV().
| bool BGIPSolution::IsEmptyPJPDP | ( | ) | const |
| void BGIPSolution::Load | ( | const std::string & | filename | ) |
| void BGIPSolution::PopNextSolutionJPPV | ( | ) |
| void BGIPSolution::PopNextSolutionPJPDP | ( | ) |
|
inline |
References SoftPrint().
| void BGIPSolution::Save | ( | const std::string & | filename | ) | const |
Referenced by BayesianGameIdenticalPayoffSolver::SaveSolution().
| void BGIPSolution::SetNrDesiredSolutions | ( | size_t | n | ) |
References _m_nrDesiredSolutions, _m_qFixedK, _m_qpFixedK, and _m_useFixedCapacityPriorityQueue.
Referenced by BGIPSolution(), and BayesianGameIdenticalPayoffSolver::SetNrDesiredSolutions().
| string BGIPSolution::SoftPrint | ( | void | ) | const |
References _m_qFixedK, _m_qInfSize, _m_qpFixedK, _m_qpInfSize, _m_useFixedCapacityPriorityQueue, FixedCapacityPriorityQueue< T, _Compare >::empty(), GetPayoff(), and FixedCapacityPriorityQueue< T, _Compare >::SoftPrint().
Referenced by Print(), BayesianGameIdenticalPayoffSolver::SoftPrintSolution(), BGIP_SolverAlternatingMaximization< JP >::Solve(), and ~BGIPSolution().
|
private |
|
private |
Referenced by AddSolution().
|
private |
This variable gives the number of solutions to return (k).
Referenced by BGIPSolution(), GetNrDesiredSolutions(), and SetNrDesiredSolutions().
|
private |
Referenced by AddSolution().
|
private |
Referenced by AddSolution().
|
private |
if we want to return the best k solutions, we store them in a priority queue.
Referenced by AddSolution(), GetJointPolicy(), GetJointPolicyPureVector(), GetNextSolutionJPPV(), GetNrFoundSolutions(), GetPayoff(), IsEmptyJPPV(), PopNextSolutionJPPV(), SetNrDesiredSolutions(), SoftPrint(), and ~BGIPSolution().
|
private |
|
private |
|
private |
|
private |
whether we use the fixed capacity priority queue
Referenced by AddSolution(), GetJointPolicy(), GetJointPolicyPureVector(), GetJointPolicyPureVectorForClusteredBG(), GetNextSolutionJPPV(), GetNextSolutionPJPDP(), GetNrFoundSolutions(), GetPayoff(), IsEmptyJPPV(), IsEmptyPJPDP(), PopNextSolutionJPPV(), PopNextSolutionPJPDP(), SetNrDesiredSolutions(), and SoftPrint().