All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
osl::eval::endgame::KingPieceTable Class Reference

玉と他の駒の関係を保持 More...

#include <kingPieceTable.h>

Inheritance diagram for osl::eval::endgame::KingPieceTable:
Inheritance graph
[legend]
Collaboration diagram for osl::eval::endgame::KingPieceTable:
Collaboration graph
[legend]

Public Types

enum  { EffectiveDimension = 81*2*82*PTYPE_SIZE }
 

Public Member Functions

int & valueOf (Square king, Player defense, Square other, Ptype ptype)
 
int valueOf (Square king, Player defense, Square other, Ptype ptype) const
 
void saveText (const char *filename) const
 kingPieceTable.cc More...
 
void loadText (const char *filename)
 
void resetWeights (const int *w)
 
void randomize ()
 
void clear ()
 

Static Public Member Functions

static int otherIndex (Square other, Ptype ptype)
 
static int kingIndex (Square king, Player defense)
 
static int effectiveIndexOf (Square king, Player defense, Square other, Ptype ptype)
 
static int dimension ()
 

Protected Member Functions

 KingPieceTable ()
 

Protected Attributes

CArray2d< int, Square::SIZE
*2, Square::SIZE *PTYPE_SIZE
data
 

Friends

bool operator== (const KingPieceTable &l, KingPieceTable &r)
 

Detailed Description

玉と他の駒の関係を保持

Definition at line 28 of file kingPieceTable.h.

Member Enumeration Documentation

anonymous enum
Enumerator
EffectiveDimension 

Definition at line 31 of file kingPieceTable.h.

Constructor & Destructor Documentation

osl::eval::endgame::KingPieceTable::KingPieceTable ( )
inlineprotected

Definition at line 34 of file kingPieceTable.h.

References data.

Member Function Documentation

void osl::eval::endgame::KingPieceTable::clear ( )

Definition at line 120 of file kingPieceTable.cc.

static int osl::eval::endgame::KingPieceTable::dimension ( )
inlinestatic

Definition at line 63 of file kingPieceTable.h.

References EffectiveDimension.

static int osl::eval::endgame::KingPieceTable::effectiveIndexOf ( Square  king,
Player  defense,
Square  other,
Ptype  ptype 
)
inlinestatic
static int osl::eval::endgame::KingPieceTable::kingIndex ( Square  king,
Player  defense 
)
inlinestatic

Definition at line 40 of file kingPieceTable.h.

References osl::Square::index(), and osl::playerToIndex().

Referenced by valueOf().

void osl::eval::endgame::KingPieceTable::loadText ( const char *  filename)
static int osl::eval::endgame::KingPieceTable::otherIndex ( Square  other,
Ptype  ptype 
)
inlinestatic

Definition at line 36 of file kingPieceTable.h.

References osl::Square::index(), and osl::PTYPE_SIZE.

Referenced by valueOf().

void osl::eval::endgame::KingPieceTable::randomize ( )
void osl::eval::endgame::KingPieceTable::resetWeights ( const int *  w)
void osl::eval::endgame::KingPieceTable::saveText ( const char *  filename) const
int& osl::eval::endgame::KingPieceTable::valueOf ( Square  king,
Player  defense,
Square  other,
Ptype  ptype 
)
inline
int osl::eval::endgame::KingPieceTable::valueOf ( Square  king,
Player  defense,
Square  other,
Ptype  ptype 
) const
inline

Definition at line 48 of file kingPieceTable.h.

References data, kingIndex(), and otherIndex().

Friends And Related Function Documentation

bool operator== ( const KingPieceTable l,
KingPieceTable r 
)
friend

Member Data Documentation

CArray2d<int,Square::SIZE*2,Square::SIZE*PTYPE_SIZE> osl::eval::endgame::KingPieceTable::data
protected

Definition at line 33 of file kingPieceTable.h.

Referenced by KingPieceTable(), osl::eval::endgame::operator==(), and valueOf().


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