upper and lower bounds on number of eyes and potential eyes More...
#include <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 |
upper and lower bounds on number of eyes and potential eyes
Definition at line 34 of file GoEyeCount.h.
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.
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 |
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 | ) |
Definition at line 122 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 127 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 15 of file GoEyeCount.cpp.
References m_isLocalSeki, m_maybeLocalSeki, and SetEyes().
Referenced by GoRegion::ComputeSingleBlockEyeSpace().
void GoEyeCount::SetMaxEyes | ( | int | eyes | ) |
Definition at line 102 of file GoEyeCount.h.
References m_maxEyes.
Referenced by GoRegion::ComputeMultipleBlockEyeSpace(), GoRegion::ComputeNakade(), and GoRegion::ComputeSingleBlockEyeSpace().
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 | ) |
Definition at line 97 of file GoEyeCount.h.
References m_minEyes.
Referenced by GoRegion::ComputeMultipleBlockEyeSpace(), GoRegion::ComputeNakade(), and GoRegion::ComputeSingleBlockEyeSpace().
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().
bool GoEyeCount::m_isLocalSeki [private] |
Definition at line 160 of file GoEyeCount.h.
Referenced by IsLocalSeki(), and SetLocalSeki().
int GoEyeCount::m_maxEyes [private] |
Definition at line 157 of file GoEyeCount.h.
Referenced by AddIndependent(), Clear(), MaxEyes(), Normalize(), NumericalAdd(), SetExactEyes(), SetMaxEyes(), and SetUnknown().
int GoEyeCount::m_maxPotEyes [private] |
Definition at line 159 of file GoEyeCount.h.
Referenced by AddIndependent(), AddPotential(), Clear(), MaxPotEyes(), Normalize(), NumericalAdd(), SetExactPotEyes(), SetMaxPotEyes(), and SetUnknown().
bool GoEyeCount::m_maybeLocalSeki [private] |
Definition at line 161 of file GoEyeCount.h.
Referenced by MaybeLocalSeki(), SetLocalSeki(), and SetMaybeLocalSeki().
int GoEyeCount::m_minEyes [private] |
Definition at line 156 of file GoEyeCount.h.
Referenced by AddIndependent(), Clear(), MinEyes(), Normalize(), NumericalAdd(), SetExactEyes(), SetMinEyes(), and SetUnknown().
int GoEyeCount::m_minPotEyes [private] |
Definition at line 158 of file GoEyeCount.h.
Referenced by AddIndependent(), AddPotential(), Clear(), MinPotEyes(), Normalize(), NumericalAdd(), SetExactPotEyes(), SetMinPotEyes(), and SetUnknown().