SGSolve
SGEdgePolicy Class Reference

Class for iterating edges of a product policy. More...

#include <sgedgepolicy.hpp>

Collaboration diagram for SGEdgePolicy:

Public Member Functions

 SGEdgePolicy (const SGProductPolicy &_master)
 Constructor. More...
 
const vector< SGPolicySet::const_iterator > & getPolicies () const
 Returns the current policy, as a vector of iterators.
 
const SGPolicySet::const_iterator & getSubPolicy () const
 Returns the current substitution.
 
bool incrementBasePolicy ()
 Increments the base policy.
 
bool incrementSubPolicy ()
 Increments the substitution.
 
const int getBaseState () const
 Returns the base state.
 
const int getSubState () const
 Returns the substitution state.
 
std::string hash () const
 Generates a unique identifier for the edge. More...
 
bool operator++ ()
 Increment the edge by either advancing the substitution or the base policy.
 

Private Attributes

const SGProductPolicymaster
 
vector< SGPolicySet::const_iterator > policies
 
SGPolicySet::const_iterator subPolicy
 
int baseState
 
int subState
 

Detailed Description

Class for iterating edges of a product policy.

< This code is used by SGSolver_MaxMinMax_3Player for exact computation of the max-min-max operator when there are three players. Given a "master" product policy, which represents a face of $\tilde{B}({\bf W})$, this class will iterate through all edges of face. These edges correspond to (i) a selection of a policy in the product policy and (ii) a substitution.

Constructor & Destructor Documentation

◆ SGEdgePolicy()

SGEdgePolicy::SGEdgePolicy ( const SGProductPolicy _master)

Constructor.

Class for iterating edges of a product policy.

Member Function Documentation

◆ hash()

std::string SGEdgePolicy::hash ( ) const

Generates a unique identifier for the edge.

< This identifier is used in tracking which edges have been visited.

Member Data Documentation

◆ baseState

int SGEdgePolicy::baseState
private

The state in which we are currently iterating the policies, as we work our way through the product policy.

◆ master

const SGProductPolicy& SGEdgePolicy::master
private

The product policy describing the face.

◆ policies

vector<SGPolicySet::const_iterator> SGEdgePolicy::policies
private

The vector of policies that makes up the current edge.

◆ subPolicy

SGPolicySet::const_iterator SGEdgePolicy::subPolicy
private

The substituted policy.

◆ subState

int SGEdgePolicy::subState
private

State in which the policy is substituted.


The documentation for this class was generated from the following files: