Definition in file GoRegionUtil.cpp.
#include "SgSystem.h"
#include "GoRegionUtil.h"
#include "GoBoard.h"
#include "GoBoardUtil.h"
#include "GoEyeUtil.h"
#include "SgVector.h"
#include "SgPointSet.h"
Go to the source code of this file.
Functions | |
bool | Has2IntersectionPoints (const GoBoard &board, const SgPointSet ®ion, const SgPoint boundaryAnchor) |
Special case of single boundary block. | |
bool | Has2IntersectionPoints (const GoBoard &board, const SgPointSet ®ion, const SgVector< SgPoint > &boundaryAnchors) |
Do liberties of boundary blocks contain 2 intersection points? | |
bool | IsAdjacentToAll (const GoBoard &board, SgPoint p, const SgVector< SgPoint > &anchors) |
Is p adjacent to all blocks represented by anchors? GoRegion has an identical function taking a list of GoBlock's. | |
bool | TwoSeparateEyes (const GoBoard &bd, const SgPointSet &pts, const SgPointSet &boundary, SgBlackWhite color) |
A simple test if the 2-vital search has produced a two-eyed group. | |
void | GoRegionUtil::FindCurrentAnchors (const GoBoard &board, const SgVector< SgPoint > &origAnchors, SgVector< SgPoint > *currentAnchors) |
Find anchors of all blocks represented by origAnchors that are present in current board position. | |
bool | GoRegionUtil::Has2IPorEyes (const GoBoard &board, const SgPointSet &pts, SgBlackWhite color, const SgVector< SgPoint > &boundaryAnchors) |
Test if pts has 2 IP or eyes. | |
bool | GoRegionUtil::Has2SureLiberties (const GoBoard &board, const SgPointSet &pts, SgBlackWhite color, const SgVector< SgPoint > &boundaryAnchors) |
Test if a point set is 2-vital for color. | |
bool | GoRegionUtil::IsSingleBlock (const GoBoard &board, const SgPointSet &pts, SgBlackWhite color) |
Do pts belong to only one block? pts must be non-empty. | |
bool | GoRegionUtil::IsSmallRegion (const GoBoard &board, const SgPointSet &pts, SgBlackWhite opp) |
A region is called small iff its interior is completely filled by opponent stones (or there is no interior). | |
bool | GoRegionUtil::StaticIs1VitalAndConnected (const GoBoard &board, const SgPointSet &pts, SgBlackWhite color) |
Check for 1-vitality, as explained in [Mueller 95, p. |
bool @16::Has2IntersectionPoints | ( | const GoBoard & | board, | |
const SgPointSet & | region, | |||
const SgVector< SgPoint > & | boundaryAnchors | |||
) | [static] |
Do liberties of boundary blocks contain 2 intersection points?
Definition at line 37 of file GoRegionUtil.cpp.
References SgVector< T >::Back(), SgVector< T >::Contains(), SgPointSet::Contains(), SgVector< T >::Front(), Has2IntersectionPoints(), SgVector< T >::IsLength(), GoEyeUtil::IsSplitPt(), SgVector< T >::MaxLength(), SgVector< T >::PushBack(), and SgVector< T >::SwapWith().
bool @16::Has2IntersectionPoints | ( | const GoBoard & | board, | |
const SgPointSet & | region, | |||
const SgPoint | boundaryAnchor | |||
) | [static] |
Special case of single boundary block.
Definition at line 21 of file GoRegionUtil.cpp.
References SgPointSet::Contains(), and GoEyeUtil::IsSplitPt().
Referenced by Has2IntersectionPoints(), GoRegionUtil::Has2IPorEyes(), and GoRegionUtil::Has2SureLiberties().
bool @16::IsAdjacentToAll | ( | const GoBoard & | board, | |
SgPoint | p, | |||
const SgVector< SgPoint > & | anchors | |||
) | [static] |
Is p adjacent to all blocks represented by anchors? GoRegion has an identical function taking a list of GoBlock's.
Definition at line 88 of file GoRegionUtil.cpp.
References GoBoard::IsLibertyOfBlock().
bool @16::TwoSeparateEyes | ( | const GoBoard & | bd, | |
const SgPointSet & | pts, | |||
const SgPointSet & | boundary, | |||
SgBlackWhite | color | |||
) | [static] |
A simple test if the 2-vital search has produced a two-eyed group.
Definition at line 104 of file GoRegionUtil.cpp.
References GoBoard::All(), GoBoard::AllEmpty(), SgPointSet::Border(), SgPointSet::Disjoint(), SgPointSet::IsConnected(), GoRegionUtil::IsSingleBlock(), SgPointSet::MinSetSize(), SG_ASSERT, SgOppBW(), and GoBoard::Size().
Referenced by GoRegionUtil::Has2SureLiberties().