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


17 Jun 2010 Doxygen 1.4.7