osl::eval::endgame::KingPieceTable Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:
[legend]
Collaboration diagram for osl::eval::endgame::KingPieceTable:
[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

Definition at line 52 of file kingPieceTable.h.

References osl::Square::isPieceStand(), osl::playerToIndex(), osl::PTYPE_SIZE, osl::Square::x(), and osl::Square::y().

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) |  |

Definition at line 41 of file kingPieceTable.cc.

Referenced by osl::eval::endgame::DefenseKing::loadText(), and osl::eval::endgame::AttackKing::loadText().

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 | ( | ) |  |

Definition at line 89 of file kingPieceTable.cc.

References osl::Square::index(), osl::Square::isPieceStand(), osl::PTYPE_SIZE, and osl::misc::random().

void osl::eval::endgame::KingPieceTable::resetWeights | ( | const int * | w) |  |

Definition at line 59 of file kingPieceTable.cc.

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

Referenced by osl::eval::endgame::DefenseKing::resetWeights(), and osl::eval::endgame::AttackKing::resetWeights().

void osl::eval::endgame::KingPieceTable::saveText | ( | const char * | filename) |  | const

kingPieceTable.cc

Definition at line 14 of file kingPieceTable.cc.

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

Referenced by osl::eval::endgame::DefenseKing::saveText().

int& osl::eval::endgame::KingPieceTable::valueOf | ( | Square | king,
|  | Player | defense,
|  | Square | other,
|  | Ptype | ptype
| ) |  |
| inline

Definition at line 44 of file kingPieceTable.h.

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

Referenced by osl::eval::endgame::DefenseKing::valueOf(), and osl::eval::endgame::AttackKing::valueOf().

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:

- kingPieceTable.h
- kingPieceTable.cc