MultiAgentDecisionProcess
|
#include <Scope.h>
Public Member Functions | |
bool | Contains (Index i) const |
Whether this contains Index i. More... | |
bool | Equals (const Scope &s) const |
Whether two scopes are equal (i.e., with same ordering) More... | |
SDT::iterator | GetIteratorForIndex (Index i) |
Returns iterator to index i in this (or end() if i not contained) More... | |
Index | GetPositionForIndex (Index i) const |
Returns the position of index i within this. More... | |
void | Insert (Index i) |
Insert an index into the scope. More... | |
void | Insert (const Scope &s) |
Merges all indices in s into this. More... | |
ScopeInstance | Instantiate (const std::vector< Index > &values) const |
bool | IsSubSetOf (const Scope &s) const |
Whether this is a subset of s. More... | |
Scope & | operator= (const Scope &o) |
Scope & | operator= (const SDT &o) |
void | Remove (const Scope &s) |
Removes all indices in s from this. More... | |
Scope () | |
Default constructor. More... | |
Scope (const SDT &o) | |
template<typename InputIterator > | |
Scope (InputIterator first, InputIterator last, const allocator_type &a=allocator_type()) | |
Scope (const std::string &s) | |
Scope (size_t size) | |
std::string | SoftPrint () const |
Scope & | Sort () |
Sorts the indices. More... | |
Scope & | SortAndUnique () |
First calls Sort() and then removes duplicate indices. More... | |
Static Public Member Functions | |
static Scope | Intersection (const Scope &a, const Scope &b) |
Returns a scope containing the intersection of a and b. More... | |
static void | Sort (Scope &scope, ScopeInstance &scopeInstance) |
Sorts the indices of the scope and applies the same reordering to the scope instance. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, const Scope &s) |
std::istream & | operator>> (std::istream &i, Scope &s) |
|
inline |
Default constructor.
|
inline |
|
inline |
Scope::Scope | ( | const std::string & | s | ) |
|
inline |
bool Scope::Contains | ( | Index | i | ) | const |
Whether this contains Index i.
Referenced by TwoStageDynamicBayesianNetwork::ComputeWithinNextStageClosure(), Intersection(), BayesianGameCollaborativeGraphical::RecurseOverAgents(), MultiAgentDecisionProcessDiscreteFactoredStates::RemoveStateFactor(), and FSAOHDist_NECOF::Update().
bool Scope::Equals | ( | const Scope & | s | ) | const |
Whether two scopes are equal (i.e., with same ordering)
References ArgumentHandlers::size().
Referenced by BayesianGameCollaborativeGraphical::AddLRF().
SDT::iterator Scope::GetIteratorForIndex | ( | Index | i | ) |
Returns iterator to index i in this (or end() if i not contained)
Returns the position of index i within this.
or throws an exception if this does not contain i.
Referenced by ProblemAloha::ComputeObservationProb(), ProblemAloha::ComputeTransitionProb(), FactoredDecPOMDPDiscrete::ConsistentVectorsOnSpecifiedScopes(), IndexTools::RestrictIndividualIndicesToNarrowerScope(), ProblemAloha::successFullySendPackage(), and FSAOHDist_NECOF::Update().
|
inline |
Insert an index into the scope.
Note this does not check for duplicates!
Referenced by MultiAgentDecisionProcess::AddAgent(), MADPComponentFactoredStates::AddStateFactor(), TwoStageDynamicBayesianNetwork::ComputeWithinNextStageClosure(), FSAOHDist_NECOF::FSAOHDist_NECOF(), ProblemFireFightingGraph::GetHousesAgentInfluences(), ProblemFOBSFireFightingGraph::GetHousesAgentInfluences(), ProblemFOBSFireFightingFactored::GetHousesAgentInfluences(), ProblemFireFightingFactored::GetHousesAgentInfluences(), FSAOHDist_NECOF::GetXOHProb_relT(), MultiAgentDecisionProcessDiscreteFactoredStates::Initialize2DBN(), ProblemAloha::InitializeAloha(), ProblemFOBSFireFightingFactored::InitializePFFF(), ProblemFireFightingFactored::InitializePFFF(), Instantiate(), Intersection(), MultiAgentDecisionProcessDiscreteFactoredStates::MarginalizeTransitionObservationModel(), MultiAgentDecisionProcess::MultiAgentDecisionProcess(), operator>>(), Problem_CGBG_FF::Problem_CGBG_FF(), BayesianGameCollaborativeGraphical::RecurseOverAgents(), MultiAgentDecisionProcessDiscreteFactoredStates::RemoveStateFactor(), TwoStageDynamicBayesianNetwork::ScopeBackup(), MultiAgentDecisionProcess::SetNrAgents(), ProblemFireFightingGraph::SetOScopes(), ProblemAloha::SetOScopes(), ProblemFireFightingFactored::SetOScopes(), FactoredDecPOMDPDiscrete::SetScopeForLRF(), ProblemFireFightingGraph::SetYScopes(), ProblemFOBSFireFightingGraph::SetYScopes(), ProblemAloha::SetYScopes(), ProblemFOBSFireFightingFactored::SetYScopes(), and ProblemFireFightingFactored::SetYScopes().
void Scope::Insert | ( | const Scope & | s | ) |
Merges all indices in s into this.
ScopeInstance Scope::Instantiate | ( | const std::vector< Index > & | values | ) | const |
References Insert().
Returns a scope containing the intersection of a and b.
References Contains(), and Insert().
Referenced by TreeIncPruneBGPlanner::ComputeKey().
bool Scope::IsSubSetOf | ( | const Scope & | s | ) | const |
Whether this is a subset of s.
References ArgumentHandlers::size().
Referenced by MultiAgentDecisionProcessDiscreteFactoredStates::Initialize2DBN().
|
inline |
void Scope::Remove | ( | const Scope & | s | ) |
Removes all indices in s from this.
Referenced by FSAOHDist_NECOF::GetXOHProb_relT(), MADPComponentFactoredStates::RemoveStateFactor(), and MultiAgentDecisionProcessDiscreteFactoredStates::RemoveStateFactor().
std::string Scope::SoftPrint | ( | ) | const |
Scope & Scope::Sort | ( | ) |
Sorts the indices.
Referenced by BayesianGameCollaborativeGraphical::AddLRF(), TwoStageDynamicBayesianNetwork::ScopeBackup(), and FactoredDecPOMDPDiscrete::SetScopeForLRF().
|
static |
Sorts the indices of the scope and applies the same reordering to the scope instance.
References apply_permutation(), and sort_permutation().
|
friend |
|
friend |