Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoInfluence.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file GoInfluence.h
00003     Simple functions for influence computation */
00004 //----------------------------------------------------------------------------
00005 
00006 #ifndef GO_INFLUENCE_H
00007 #define GO_INFLUENCE_H
00008 
00009 #include "GoBoard.h"
00010 #include "SgPointArray.h"
00011 
00012 //----------------------------------------------------------------------------
00013 
00014 namespace GoInfluence {
00015 
00016 /** Compute influence by nuExpand expansions followed by nuShrink
00017     contractions.
00018     Starts from the player's stones.
00019     Expand: add the neighbor points
00020     Shrink: take away the points on the border of the set */
00021 void FindInfluence(const GoBoard& board, int nuExpand, int nuShrink,
00022                    SgBWSet* result);
00023 
00024 /** Influence of a single player. @see FindInfluence.
00025     If possible use FindInfluence directly instead of calling this twice
00026     for black and white. */
00027 int Influence(const GoBoard& board, SgBlackWhite color, int nuExpand,
00028               int nuShrink);
00029 
00030 /** Compute influence, stopping at stopPts */
00031 void ComputeInfluence(const GoBoard& board, const SgBWSet& stopPts,
00032                       SgBWArray<SgPointArray<int> >* influence);
00033 
00034 } // namespace GoInfluence
00035 
00036 //----------------------------------------------------------------------------
00037 
00038 #endif // GO_INFLUENCE_H
00039 


Sun Mar 13 2011 Doxygen 1.7.1