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

SgEvaluatedMoves Class Reference

Simple data structure keeps a best move value and a list of all moves with that value. More...

#include <SgEvaluatedMoves.h>

Inheritance diagram for SgEvaluatedMoves:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SgEvaluatedMoves (const SgPointSet &relevant)
 SgEvaluatedMoves (const SgEvaluatedMoves &original)
virtual ~SgEvaluatedMoves ()
virtual void AddMove (SgPoint move, int value)
virtual void AddMoves (const SgPointSet &moves, int value)
virtual void AddMoves (const SgVector< SgPoint > &moves, int value)
virtual void Clear ()
SgPoint BestMove ()
int BestValue ()
const SgPointSetRelevant () const
bool IsRelevant (SgPoint p) const
void Disable (SgPoint p)
void Enable (SgPoint p)
virtual SgEvaluatedMovesDuplicate () const
virtual int GetEvaluation (SgPoint p) const
virtual void BestMoves (SgVector< SgPoint > &best, int nuMoves) const
 Compute list of the n best moves.

Protected Attributes

int m_bestValue
SgVector< SgPointm_moveList
SgPointSet m_relevant

Static Protected Attributes

static const int s_minValue = INT_MIN + 1

Detailed Description

Simple data structure keeps a best move value and a list of all moves with that value.

Todo:
Originally worked with any SgMove, but introduction of SgPointSet relevant now requires SgMove=SgPoint. Should be made independent of that again, otherwise, why not merge with SgEvaluatedMovesArray?

Definition at line 19 of file SgEvaluatedMoves.h.


Constructor & Destructor Documentation

SgEvaluatedMoves::SgEvaluatedMoves ( const SgPointSet relevant  )  [explicit]

Definition at line 22 of file SgEvaluatedMoves.h.

Referenced by Duplicate().

SgEvaluatedMoves::SgEvaluatedMoves ( const SgEvaluatedMoves original  ) 

Definition at line 27 of file SgEvaluatedMoves.h.

virtual SgEvaluatedMoves::~SgEvaluatedMoves (  )  [virtual]

Definition at line 33 of file SgEvaluatedMoves.h.


Member Function Documentation

void SgEvaluatedMoves::AddMove ( SgPoint  move,
int  value 
) [virtual]
void SgEvaluatedMoves::AddMoves ( const SgPointSet moves,
int  value 
) [virtual]

Definition at line 32 of file SgEvaluatedMoves.cpp.

References AddMove().

void SgEvaluatedMoves::AddMoves ( const SgVector< SgPoint > &  moves,
int  value 
) [virtual]

Definition at line 38 of file SgEvaluatedMoves.cpp.

References AddMove().

SgPoint SgEvaluatedMoves::BestMove (  ) 
void SgEvaluatedMoves::BestMoves ( SgVector< SgPoint > &  best,
int  nuMoves 
) const [virtual]

Compute list of the n best moves.

Reimplemented in SgEvaluatedMovesArray.

Definition at line 52 of file SgEvaluatedMoves.cpp.

References m_moveList, and SG_UNUSED().

int SgEvaluatedMoves::BestValue (  ) 

Definition at line 50 of file SgEvaluatedMoves.h.

References m_bestValue.

virtual void SgEvaluatedMoves::Clear (  )  [virtual]

Reimplemented in SgEvaluatedMovesArray.

Definition at line 42 of file SgEvaluatedMoves.h.

References SgVector< T >::Clear(), m_bestValue, m_moveList, and s_minValue.

void SgEvaluatedMoves::Disable ( SgPoint  p  ) 

Definition at line 65 of file SgEvaluatedMoves.h.

References SgPointSet::Exclude(), and m_relevant.

virtual SgEvaluatedMoves* SgEvaluatedMoves::Duplicate (  )  const [virtual]

Reimplemented in SgEvaluatedMovesArray.

Definition at line 75 of file SgEvaluatedMoves.h.

References SgEvaluatedMoves().

void SgEvaluatedMoves::Enable ( SgPoint  p  ) 

Definition at line 70 of file SgEvaluatedMoves.h.

References SgPointSet::Include(), and m_relevant.

virtual int SgEvaluatedMoves::GetEvaluation ( SgPoint  p  )  const [virtual]

Reimplemented in SgEvaluatedMovesArray.

Definition at line 80 of file SgEvaluatedMoves.h.

References SgVector< T >::Contains(), m_bestValue, and m_moveList.

bool SgEvaluatedMoves::IsRelevant ( SgPoint  p  )  const

Definition at line 60 of file SgEvaluatedMoves.h.

References m_relevant.

const SgPointSet& SgEvaluatedMoves::Relevant (  )  const

Definition at line 55 of file SgEvaluatedMoves.h.

References m_relevant.


Member Data Documentation

Definition at line 92 of file SgEvaluatedMoves.h.

Referenced by AddMove(), BestValue(), Clear(), and GetEvaluation().

Definition at line 94 of file SgEvaluatedMoves.h.

Referenced by AddMove(), BestMove(), BestMoves(), Clear(), and GetEvaluation().

const int SgEvaluatedMoves::s_minValue = INT_MIN + 1 [static, protected]

Definition at line 99 of file SgEvaluatedMoves.h.

Referenced by Clear(), and SgEvaluatedMovesArray::SelectNextBest().


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


Sun Mar 13 2011 Doxygen 1.7.1