Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

InferiorCells Class Reference

Set of inferior cells. More...

#include <InferiorCells.hpp>

List of all members.

Public Member Functions

 InferiorCells ()
 Constructs empty inferior cell set.
bitset_t Dead () const
bitset_t Captured (HexColor color) const
bitset_t PermInf (HexColor color) const
bitset_t PermInfCarrier (HexColor color) const
bitset_t MutualFillin (HexColor color) const
bitset_t MutualFillinCarrier (HexColor color) const
bitset_t Vulnerable () const
 Returns the set of vulnerable cells.
bitset_t Reversible () const
 Returns the set of reversible cells.
bitset_t Dominated () const
 Returns the set of dominated cells.
bitset_t All () const
bitset_t Fillin (HexColor color) const
const std::set
< VulnerableKiller > & 
Killers (HexPoint p) const
const std::set< HexPoint > & Reversers (HexPoint p) const
bitset_t AllReversers () const
bitset_t AllReversibleCarriers () const
std::string GuiOutput () const
 Returns a string representation of its internal state.
bitset_t FindPresimplicialPairs () const
 Examines the vulnerable cells; returns the set of presimplicial cells on the cells they kill.
bitset_t DeductionSet (HexColor color) const
 Uses the inferior cell information to compute the deduction set.
void AddDead (const bitset_t &dead)
void AddDead (HexPoint dead)
void AddCaptured (HexColor color, const bitset_t &captured)
void AddCaptured (HexColor color, HexPoint captured)
void AddPermInf (HexColor color, const bitset_t &cells, const bitset_t &carrier)
void AddPermInf (HexColor color, HexPoint cell, const bitset_t &carrier)
void AddMutualFillin (HexColor color, const bitset_t &cells, const bitset_t &carrier)
void AddMutualFillin (HexColor color, HexPoint cell, const bitset_t &carrier)
void AddDominated (HexPoint cell, HexPoint dominator)
void AddDominated (HexPoint cell, const std::set< HexPoint > &dom)
void AddVulnerable (HexPoint cell, HexPoint killer)
void AddVulnerable (HexPoint cell, const std::set< HexPoint > &killers)
void AddVulnerable (HexPoint cell, const VulnerableKiller &killer)
void AddVulnerable (HexPoint cell, const std::set< VulnerableKiller > &dom)
void AddReversible (HexPoint cell, bitset_t carrier, HexPoint reverser)
void AddReversible (HexPoint cell, bitset_t carrier, const std::set< HexPoint > &reversers)
void AddDominatedFrom (const InferiorCells &other)
void AddVulnerableFrom (const InferiorCells &other)
void AddReversibleFrom (const InferiorCells &other)
void AddPermInfFrom (HexColor color, const InferiorCells &other)
void AddMutualFillinFrom (HexColor color, const InferiorCells &other)
void Clear ()
void ClearDead ()
void ClearVulnerable ()
void ClearReversible ()
void ClearDominated ()
void ClearCaptured (HexColor color)
void ClearPermInf (HexColor color)
void ClearMutualFillin (HexColor color)
void RemoveDead (const bitset_t &dead)
void RemoveCaptured (HexColor color, const bitset_t &captured)
void RemoveDominated (const bitset_t &dominated)
void RemoveVulnerable (const bitset_t &vulnerable)
void RemoveReversible (const bitset_t &reversible)
void RemoveReversible (HexPoint reversible)
void RemovePermInf (HexColor color, const bitset_t &perminf)
void RemoveMutualFillin (HexColor color, const bitset_t &mutual)

Private Member Functions

void AssertPairwiseDisjoint () const

Private Attributes

bitset_t m_dead
bitset_t m_captured [BLACK_AND_WHITE]
bitset_t m_perm_inf [BLACK_AND_WHITE]
bitset_t m_perm_inf_carrier [BLACK_AND_WHITE]
bitset_t m_mutual_fillin [BLACK_AND_WHITE]
bitset_t m_mutual_fillin_carrier [BLACK_AND_WHITE]
bitset_t m_vulnerable
 Vulnerable cells; not those involved in presimplicial pairs, though.
std::set< VulnerableKillerm_killers [BITSETSIZE]
bitset_t m_reversible
 Reversible cells and their reversers.
std::set< HexPointm_reversers [BITSETSIZE]
bitset_t m_allReversibleCarriers
 Data to test for independent captured-reversible sets.
bitset_t m_allReversers
Digraph< HexPointm_dom_graph
 Graph of domination; dominated cells point to their dominators.
bool m_dominated_computed
 True if the dominated set has been computed from the domination graph.
bitset_t m_dominated
 The sources of the domination graph minus a few representatives.

Detailed Description

Set of inferior cells.

Definition at line 84 of file InferiorCells.hpp.


Constructor & Destructor Documentation

InferiorCells::InferiorCells (  ) 

Constructs empty inferior cell set.

Definition at line 21 of file InferiorCells.cpp.


Member Function Documentation

void InferiorCells::AddCaptured ( HexColor  color,
HexPoint  captured 
)

Definition at line 90 of file InferiorCells.cpp.

References AddCaptured(), and benzene_bitset< _Nb >::set().

void InferiorCells::AddCaptured ( HexColor  color,
const bitset_t captured 
)
void InferiorCells::AddDead ( HexPoint  dead  ) 

Definition at line 72 of file InferiorCells.cpp.

References AddDead(), and benzene_bitset< _Nb >::set().

void InferiorCells::AddDead ( const bitset_t dead  ) 
void InferiorCells::AddDominated ( HexPoint  cell,
const std::set< HexPoint > &  dom 
)

Definition at line 152 of file InferiorCells.cpp.

References Digraph< T >::AddEdges(), m_dom_graph, and m_dominated_computed.

void InferiorCells::AddDominated ( HexPoint  cell,
HexPoint  dominator 
)
void InferiorCells::AddDominatedFrom ( const InferiorCells other  ) 
void InferiorCells::AddMutualFillin ( HexColor  color,
HexPoint  cell,
const bitset_t carrier 
)

Definition at line 144 of file InferiorCells.cpp.

References AddMutualFillin(), and benzene_bitset< _Nb >::set().

void InferiorCells::AddMutualFillin ( HexColor  color,
const bitset_t cells,
const bitset_t carrier 
)
void InferiorCells::AddMutualFillinFrom ( HexColor  color,
const InferiorCells other 
)

Definition at line 318 of file InferiorCells.cpp.

References AssertPairwiseDisjoint(), m_mutual_fillin, and m_mutual_fillin_carrier.

Referenced by IceUtil::Update().

void InferiorCells::AddPermInf ( HexColor  color,
HexPoint  cell,
const bitset_t carrier 
)

Definition at line 122 of file InferiorCells.cpp.

References AddPermInf(), and benzene_bitset< _Nb >::set().

void InferiorCells::AddPermInf ( HexColor  color,
const bitset_t cells,
const bitset_t carrier 
)
void InferiorCells::AddPermInfFrom ( HexColor  color,
const InferiorCells other 
)

Definition at line 311 of file InferiorCells.cpp.

References AssertPairwiseDisjoint(), m_perm_inf, and m_perm_inf_carrier.

Referenced by IceUtil::Update().

void InferiorCells::AddReversible ( HexPoint  cell,
bitset_t  carrier,
const std::set< HexPoint > &  reversers 
)
void InferiorCells::AddReversible ( HexPoint  cell,
bitset_t  carrier,
HexPoint  reverser 
)
void InferiorCells::AddReversibleFrom ( const InferiorCells other  ) 
void InferiorCells::AddVulnerable ( HexPoint  cell,
const std::set< VulnerableKiller > &  dom 
)
void InferiorCells::AddVulnerable ( HexPoint  cell,
const VulnerableKiller killer 
)
void InferiorCells::AddVulnerable ( HexPoint  cell,
const std::set< HexPoint > &  killers 
)
void InferiorCells::AddVulnerable ( HexPoint  cell,
HexPoint  killer 
)
void InferiorCells::AddVulnerableFrom ( const InferiorCells other  ) 

Definition at line 293 of file InferiorCells.cpp.

References AddVulnerable(), AssertPairwiseDisjoint(), m_killers, and Vulnerable().

Referenced by IceUtil::Update().

bitset_t InferiorCells::All (  )  const
bitset_t InferiorCells::AllReversers (  )  const [inline]

Definition at line 318 of file InferiorCells.hpp.

References m_allReversers.

Referenced by AddReversibleFrom().

bitset_t InferiorCells::AllReversibleCarriers (  )  const [inline]

Definition at line 323 of file InferiorCells.hpp.

References m_allReversibleCarriers.

Referenced by AddReversibleFrom().

void InferiorCells::AssertPairwiseDisjoint (  )  const [private]
bitset_t InferiorCells::Captured ( HexColor  color  )  const [inline]
void InferiorCells::Clear (  ) 
void InferiorCells::ClearCaptured ( HexColor  color  ) 

Definition at line 346 of file InferiorCells.cpp.

References m_captured, and benzene_bitset< _Nb >::reset().

Referenced by Clear().

void InferiorCells::ClearDead (  ) 

Definition at line 341 of file InferiorCells.cpp.

References m_dead, and benzene_bitset< _Nb >::reset().

Referenced by Clear().

void InferiorCells::ClearDominated (  ) 

Definition at line 377 of file InferiorCells.cpp.

References Digraph< T >::Clear(), m_dom_graph, and m_dominated_computed.

Referenced by Clear(), and IceUtil::Update().

void InferiorCells::ClearMutualFillin ( HexColor  color  ) 

Definition at line 357 of file InferiorCells.cpp.

References m_mutual_fillin, m_mutual_fillin_carrier, and benzene_bitset< _Nb >::reset().

Referenced by Clear().

void InferiorCells::ClearPermInf ( HexColor  color  ) 

Definition at line 351 of file InferiorCells.cpp.

References m_perm_inf, m_perm_inf_carrier, and benzene_bitset< _Nb >::reset().

Referenced by Clear().

void InferiorCells::ClearReversible (  ) 
void InferiorCells::ClearVulnerable (  ) 
bitset_t InferiorCells::Dead (  )  const [inline]
bitset_t InferiorCells::DeductionSet ( HexColor  color  )  const

Uses the inferior cell information to compute the deduction set.

This is the part of the proof set used to derive the equivalent ICE-reduced board. The proof set is composed of this, the played stones, and (some subset of) the empty cells on the ICE-reduced board. Note: it is assumed the color passed in is the player for whom the pruning (vulnerable, reversible, dominated) was computed, so these are not used... just the fillin.

Definition at line 513 of file InferiorCells.cpp.

References Captured(), MutualFillin(), MutualFillinCarrier(), PermInf(), and PermInfCarrier().

Referenced by ProofUtil::InitialProofForOpponent(), and ProofUtil::MaximumProofSet().

bitset_t InferiorCells::Dominated (  )  const

Returns the set of dominated cells.

This is not the same as the set of all cells dominated by some other cell. The returned is a maximal set of dominated cells that can be ignored during move

Note:
A cell can be both dominated (have an outgoing arc in the domination graph), and be vulnerable (have an outgoing arc in the vulnerable graph) and/or reversible. In such a case, the cell will never appear in the cells returned by Dominated().

Todo:
ensure m_dominated is disjoint from all others.

Definition at line 28 of file InferiorCells.cpp.

References InferiorCellsUtil::FindDominationCaptains(), HexAssert, m_dom_graph, m_dominated, m_dominated_computed, Digraph< T >::RemoveVertex(), Reversible(), BitsetUtil::SetToBitset(), Digraph< T >::Vertices(), and Vulnerable().

Referenced by All(), ICEngine::BackupOpponentDead(), and GuiOutput().

bitset_t InferiorCells::Fillin ( HexColor  color  )  const

Definition at line 63 of file InferiorCells.cpp.

References Captured(), Dead(), DEAD_COLOR, MutualFillin(), and PermInf().

Referenced by ICEngine::BackupOpponentDead().

bitset_t InferiorCells::FindPresimplicialPairs (  )  const

Examines the vulnerable cells; returns the set of presimplicial cells on the cells they kill.

Todo:
Handle vulnerable cycles larger than length 2? If they occur, they are extrememly rare, so it is probably not worth it.

Definition at line 466 of file InferiorCells.cpp.

References m_killers, m_vulnerable, benzene_bitset< _Nb >::set(), and benzene_bitset< _Nb >::test().

Referenced by ICEngine::FillInVulnerable().

std::string InferiorCells::GuiOutput (  )  const

Returns a string representation of its internal state.

The format is as follows: 1) First character is either f (for fill-in) or i (for ignorable) 2a) If fill-in, 2nd character is c/d/p/u (captured/dead/perminf/mutual) and 3rd character is b/w (black/white fill-in colour) 2b) If ignorable, 2nd character is v/r/d (vulnerable/reversible/domin) and 3rd entry is list of killers/reversers/dominators

Definition at line 526 of file InferiorCells.cpp.

References BLACK, Captured(), Dead(), DEAD_COLOR, Dominated(), FIRST_INVALID, m_dom_graph, m_killers, m_reversers, MutualFillin(), Digraph< T >::out_begin(), Digraph< T >::out_end(), PermInf(), Reversible(), benzene_bitset< _Nb >::test(), Vulnerable(), and WHITE.

Referenced by VCCommands::CmdBuildIncremental(), VCCommands::CmdBuildStatic(), and DfsSolver::SolveInteriorState().

const std::set< VulnerableKiller > & InferiorCells::Killers ( HexPoint  p  )  const [inline]

Definition at line 307 of file InferiorCells.hpp.

References m_killers.

Referenced by ProofUtil::InitialProofForOpponent().

bitset_t InferiorCells::MutualFillin ( HexColor  color  )  const [inline]

Definition at line 296 of file InferiorCells.hpp.

References m_mutual_fillin.

Referenced by All(), DeductionSet(), Fillin(), and GuiOutput().

bitset_t InferiorCells::MutualFillinCarrier ( HexColor  color  )  const [inline]

Definition at line 301 of file InferiorCells.hpp.

References m_mutual_fillin_carrier.

Referenced by DeductionSet().

bitset_t InferiorCells::PermInf ( HexColor  color  )  const [inline]

Definition at line 286 of file InferiorCells.hpp.

References m_perm_inf.

Referenced by All(), DeductionSet(), Fillin(), and GuiOutput().

bitset_t InferiorCells::PermInfCarrier ( HexColor  color  )  const [inline]

Definition at line 291 of file InferiorCells.hpp.

References m_perm_inf_carrier.

Referenced by DeductionSet().

void InferiorCells::RemoveCaptured ( HexColor  color,
const bitset_t captured 
)
void InferiorCells::RemoveDead ( const bitset_t dead  ) 
void InferiorCells::RemoveDominated ( const bitset_t dominated  ) 
void InferiorCells::RemoveMutualFillin ( HexColor  color,
const bitset_t mutual 
)
void InferiorCells::RemovePermInf ( HexColor  color,
const bitset_t perminf 
)
void InferiorCells::RemoveReversible ( HexPoint  reversible  ) 
void InferiorCells::RemoveReversible ( const bitset_t reversible  ) 
void InferiorCells::RemoveVulnerable ( const bitset_t vulnerable  ) 
const std::set< HexPoint > & InferiorCells::Reversers ( HexPoint  p  )  const [inline]

Definition at line 313 of file InferiorCells.hpp.

References m_reversers.

Referenced by ProofUtil::InitialProofForOpponent().

bitset_t InferiorCells::Reversible (  )  const [inline]

Returns the set of reversible cells.

Note:
An empty cell can be both reversible and vulnerable. In this case it will be vulnerable and not appear in the cells returned by Reversible().

Definition at line 276 of file InferiorCells.hpp.

References m_reversible.

Referenced by AddReversibleFrom(), All(), ICEngine::BackupOpponentDead(), ICEngine::ComputeInferiorCells(), Dominated(), GuiOutput(), and ProofUtil::InitialProofForOpponent().

bitset_t InferiorCells::Vulnerable (  )  const [inline]

Member Data Documentation

Data to test for independent captured-reversible sets.

Definition at line 246 of file InferiorCells.hpp.

Referenced by AddReversible(), AddReversibleFrom(), AllReversibleCarriers(), AssertPairwiseDisjoint(), and ClearReversible().

Definition at line 225 of file InferiorCells.hpp.

Referenced by AddCaptured(), AssertPairwiseDisjoint(), Captured(), and ClearCaptured().

Definition at line 223 of file InferiorCells.hpp.

Referenced by AddDead(), AssertPairwiseDisjoint(), ClearDead(), and Dead().

Graph of domination; dominated cells point to their dominators.

Definition at line 253 of file InferiorCells.hpp.

Referenced by AddDominated(), AddDominatedFrom(), ClearDominated(), Dominated(), GuiOutput(), and RemoveDominated().

The sources of the domination graph minus a few representatives.

Definition at line 262 of file InferiorCells.hpp.

Referenced by AssertPairwiseDisjoint(), and Dominated().

bool InferiorCells::m_dominated_computed [mutable, private]

True if the dominated set has been computed from the domination graph.

Set to false whenever the domination graph changes.

Definition at line 258 of file InferiorCells.hpp.

Referenced by AddDominated(), AddReversible(), AddVulnerable(), AssertPairwiseDisjoint(), ClearDominated(), ClearReversible(), ClearVulnerable(), Dominated(), RemoveDominated(), RemoveReversible(), and RemoveVulnerable().

Definition at line 228 of file InferiorCells.hpp.

Referenced by AddPermInf(), AddPermInfFrom(), ClearPermInf(), and PermInfCarrier().

Reversible cells and their reversers.

Definition at line 243 of file InferiorCells.hpp.

Referenced by AddReversible(), AssertPairwiseDisjoint(), ClearReversible(), RemoveReversible(), and Reversible().

Vulnerable cells; not those involved in presimplicial pairs, though.

Definition at line 237 of file InferiorCells.hpp.

Referenced by AddReversible(), AddVulnerable(), AssertPairwiseDisjoint(), ClearVulnerable(), FindPresimplicialPairs(), RemoveVulnerable(), and Vulnerable().


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


6 Jan 2011 Doxygen 1.6.3