Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoEyeCount Class Reference

#include <GoEyeCount.h>

List of all members.


Detailed Description

upper and lower bounds on number of eyes and potential eyes

Definition at line 36 of file GoEyeCount.h.

Public Member Functions

 GoEyeCount ()
 GoEyeCount (int minEyes, int maxEyes, int minPotEyes, int maxPotEyes)
int MinEyes () const
int MaxEyes () const
int MinPotEyes () const
int MaxPotEyes () const
bool IsLocalSeki () const
bool MaybeLocalSeki () const
void Clear ()
void SetUnknown ()
 unknown eye count: min = 0, max = 2
void SetMinEyes (int eyes)
void SetMaxEyes (int eyes)
void SetExactEyes (int eyes)
void SetMinPotEyes (int eyes)
void SetMaxPotEyes (int eyes)
void SetExactPotEyes (int eyes)
void SetEyes (int eyes, int potEyes)
void SetLocalSeki ()
 locally, at least a seki for defender
void SetMaybeLocalSeki ()
 Could be a seki for defender but not sure.
void Normalize ()
 Make sure all eye counts are <=2 and consistent.
void AddIndependent (const GoEyeCount &from)
 Compute total eye count of two independent areas.
void NumericalAdd (const GoEyeCount &from)
 In contrast to AddIndependent, just adds numbers.
void AddPotential (const GoEyeCount &from)

Private Attributes

int m_minEyes
int m_maxEyes
int m_minPotEyes
int m_maxPotEyes
bool m_isLocalSeki
bool m_maybeLocalSeki


Constructor & Destructor Documentation

GoEyeCount::GoEyeCount (  ) 

Definition at line 39 of file GoEyeCount.h.

GoEyeCount::GoEyeCount ( int  minEyes,
int  maxEyes,
int  minPotEyes,
int  maxPotEyes 
)

Definition at line 48 of file GoEyeCount.h.


Member Function Documentation

void GoEyeCount::AddIndependent ( const GoEyeCount from  ) 

Compute total eye count of two independent areas.

This takes sente and gote into account - if there are two independent gote eyes, then it is one sure eye.

Definition at line 44 of file GoEyeCount.cpp.

References m_maxEyes, m_maxPotEyes, m_minEyes, and m_minPotEyes.

void GoEyeCount::AddPotential ( const GoEyeCount from  ) 

Definition at line 62 of file GoEyeCount.cpp.

References m_maxPotEyes, m_minPotEyes, MaxPotEyes(), and MinPotEyes().

void GoEyeCount::Clear (  ) 

Definition at line 87 of file GoEyeCount.h.

References m_maxEyes, m_maxPotEyes, m_minEyes, and m_minPotEyes.

Referenced by GoRegion::ResetNonBlockFlags().

bool GoEyeCount::IsLocalSeki (  )  const

Definition at line 77 of file GoEyeCount.h.

References m_isLocalSeki.

Referenced by operator<<().

int GoEyeCount::MaxEyes (  )  const

Definition at line 62 of file GoEyeCount.h.

References m_maxEyes.

Referenced by GoRegion::MaxEyes(), and operator<<().

int GoEyeCount::MaxPotEyes (  )  const

Definition at line 72 of file GoEyeCount.h.

References m_maxPotEyes.

Referenced by AddPotential(), GoRegion::MaxPotEyes(), and operator<<().

bool GoEyeCount::MaybeLocalSeki (  )  const

Definition at line 82 of file GoEyeCount.h.

References m_maybeLocalSeki.

Referenced by operator<<().

int GoEyeCount::MinEyes (  )  const

Definition at line 57 of file GoEyeCount.h.

References m_minEyes.

Referenced by GoRegion::MinEyes(), and operator<<().

int GoEyeCount::MinPotEyes (  )  const

Definition at line 67 of file GoEyeCount.h.

References m_minPotEyes.

Referenced by AddPotential(), GoRegion::MinPotEyes(), and operator<<().

void GoEyeCount::Normalize (  ) 

Make sure all eye counts are <=2 and consistent.

Definition at line 23 of file GoEyeCount.cpp.

References m_maxEyes, m_maxPotEyes, m_minEyes, and m_minPotEyes.

Referenced by GoRegion::ComputeNakade().

void GoEyeCount::NumericalAdd ( const GoEyeCount from  ) 

In contrast to AddIndependent, just adds numbers.

Definition at line 54 of file GoEyeCount.cpp.

References m_maxEyes, m_maxPotEyes, m_minEyes, and m_minPotEyes.

void GoEyeCount::SetExactEyes ( int  eyes  ) 

Definition at line 109 of file GoEyeCount.h.

References m_maxEyes, and m_minEyes.

Referenced by SetEyes().

void GoEyeCount::SetExactPotEyes ( int  eyes  ) 

Definition at line 124 of file GoEyeCount.h.

References m_maxPotEyes, and m_minPotEyes.

Referenced by GoRegion::ComputeMultipleBlockEyeSpace(), GoRegion::ComputeSingleBlockEyeSpace(), and SetEyes().

void GoEyeCount::SetEyes ( int  eyes,
int  potEyes 
)

Definition at line 129 of file GoEyeCount.h.

References SetExactEyes(), and SetExactPotEyes().

Referenced by GoRegion::ComputeMultipleBlockEyeSpace(), GoRegion::ComputeSingleBlockEyeSpace(), and SetLocalSeki().

void GoEyeCount::SetLocalSeki (  ) 

locally, at least a seki for defender

Definition at line 16 of file GoEyeCount.cpp.

References m_isLocalSeki, m_maybeLocalSeki, and SetEyes().

Referenced by GoRegion::ComputeSingleBlockEyeSpace().

void GoEyeCount::SetMaxEyes ( int  eyes  ) 

Definition at line 104 of file GoEyeCount.h.

References m_maxEyes.

Referenced by GoRegion::ComputeMultipleBlockEyeSpace(), GoRegion::ComputeNakade(), and GoRegion::ComputeSingleBlockEyeSpace().

void GoEyeCount::SetMaxPotEyes ( int  eyes  ) 

Definition at line 119 of file GoEyeCount.h.

References m_maxPotEyes.

Referenced by GoRegion::ComputeNakade().

void GoEyeCount::SetMaybeLocalSeki (  ) 

Could be a seki for defender but not sure.

Definition at line 139 of file GoEyeCount.h.

References m_maybeLocalSeki.

Referenced by GoRegion::ComputeSingleBlockEyeSpace().

void GoEyeCount::SetMinEyes ( int  eyes  ) 

Definition at line 99 of file GoEyeCount.h.

References m_minEyes.

Referenced by GoRegion::ComputeMultipleBlockEyeSpace(), GoRegion::ComputeNakade(), and GoRegion::ComputeSingleBlockEyeSpace().

void GoEyeCount::SetMinPotEyes ( int  eyes  ) 

Definition at line 114 of file GoEyeCount.h.

References m_minPotEyes.

Referenced by GoRegion::ComputeNakade().

void GoEyeCount::SetUnknown (  ) 

unknown eye count: min = 0, max = 2

Definition at line 93 of file GoEyeCount.h.

References m_maxEyes, m_maxPotEyes, m_minEyes, and m_minPotEyes.

Referenced by GoRegion::ComputeNakade().


Member Data Documentation

bool GoEyeCount::m_isLocalSeki [private]

Definition at line 163 of file GoEyeCount.h.

Referenced by IsLocalSeki(), and SetLocalSeki().

int GoEyeCount::m_maxEyes [private]

Definition at line 160 of file GoEyeCount.h.

Referenced by AddIndependent(), Clear(), MaxEyes(), Normalize(), NumericalAdd(), SetExactEyes(), SetMaxEyes(), and SetUnknown().

int GoEyeCount::m_maxPotEyes [private]

Definition at line 162 of file GoEyeCount.h.

Referenced by AddIndependent(), AddPotential(), Clear(), MaxPotEyes(), Normalize(), NumericalAdd(), SetExactPotEyes(), SetMaxPotEyes(), and SetUnknown().

bool GoEyeCount::m_maybeLocalSeki [private]

Definition at line 164 of file GoEyeCount.h.

Referenced by MaybeLocalSeki(), SetLocalSeki(), and SetMaybeLocalSeki().

int GoEyeCount::m_minEyes [private]

Definition at line 159 of file GoEyeCount.h.

Referenced by AddIndependent(), Clear(), MinEyes(), Normalize(), NumericalAdd(), SetExactEyes(), SetMinEyes(), and SetUnknown().

int GoEyeCount::m_minPotEyes [private]

Definition at line 161 of file GoEyeCount.h.

Referenced by AddIndependent(), AddPotential(), Clear(), MinPotEyes(), Normalize(), NumericalAdd(), SetExactPotEyes(), SetMinPotEyes(), and SetUnknown().


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


17 Jun 2010 Doxygen 1.4.7