Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Attributes

GoEyeCount Class Reference

upper and lower bounds on number of eyes and potential eyes More...

#include <GoEyeCount.h>

List of all members.

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

Detailed Description

upper and lower bounds on number of eyes and potential eyes

Definition at line 34 of file GoEyeCount.h.


Constructor & Destructor Documentation

GoEyeCount::GoEyeCount (  ) 

Definition at line 37 of file GoEyeCount.h.

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

Definition at line 46 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 43 of file GoEyeCount.cpp.

References m_maxEyes, m_maxPotEyes, m_minEyes, and m_minPotEyes.

void GoEyeCount::AddPotential ( const GoEyeCount from  ) 

Definition at line 61 of file GoEyeCount.cpp.

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

void GoEyeCount::Clear (  ) 

Definition at line 85 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 75 of file GoEyeCount.h.

References m_isLocalSeki.

Referenced by operator<<().

int GoEyeCount::MaxEyes (  )  const

Definition at line 60 of file GoEyeCount.h.

References m_maxEyes.

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

int GoEyeCount::MaxPotEyes (  )  const

Definition at line 70 of file GoEyeCount.h.

References m_maxPotEyes.

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

bool GoEyeCount::MaybeLocalSeki (  )  const

Definition at line 80 of file GoEyeCount.h.

References m_maybeLocalSeki.

Referenced by operator<<().

int GoEyeCount::MinEyes (  )  const

Definition at line 55 of file GoEyeCount.h.

References m_minEyes.

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

int GoEyeCount::MinPotEyes (  )  const

Definition at line 65 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 22 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 53 of file GoEyeCount.cpp.

References m_maxEyes, m_maxPotEyes, m_minEyes, and m_minPotEyes.

void GoEyeCount::SetExactEyes ( int  eyes  ) 

Definition at line 107 of file GoEyeCount.h.

References m_maxEyes, and m_minEyes.

Referenced by SetEyes().

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

locally, at least a seki for defender

Definition at line 15 of file GoEyeCount.cpp.

References m_isLocalSeki, m_maybeLocalSeki, and SetEyes().

Referenced by GoRegion::ComputeSingleBlockEyeSpace().

void GoEyeCount::SetMaxEyes ( int  eyes  ) 
void GoEyeCount::SetMaxPotEyes ( int  eyes  ) 

Definition at line 117 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 137 of file GoEyeCount.h.

References m_maybeLocalSeki.

Referenced by GoRegion::ComputeSingleBlockEyeSpace().

void GoEyeCount::SetMinEyes ( int  eyes  ) 
void GoEyeCount::SetMinPotEyes ( int  eyes  ) 

Definition at line 112 of file GoEyeCount.h.

References m_minPotEyes.

Referenced by GoRegion::ComputeNakade().

void GoEyeCount::SetUnknown (  ) 

unknown eye count: min = 0, max = 2

Definition at line 91 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 160 of file GoEyeCount.h.

Referenced by IsLocalSeki(), and SetLocalSeki().

int GoEyeCount::m_maxEyes [private]
int GoEyeCount::m_maxPotEyes [private]

Definition at line 161 of file GoEyeCount.h.

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

int GoEyeCount::m_minEyes [private]
int GoEyeCount::m_minPotEyes [private]

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


Sun Mar 13 2011 Doxygen 1.7.1