StateとOBMoveを保持する. More...
#include <openingBook.h>
Public Member Functions | |
WinCountBook (const char *filename) | |
~WinCountBook () | |
int | getWinCount (int stateIndex) |
int | getLoseCount (int stateIndex) |
vector< OBMove > | getMoves (int stateIndex) |
Private Member Functions | |
int | readInt () |
void | seek (int offset) |
Private Attributes | |
int | nStates |
std::ifstream | ifs |
StateとOBMoveを保持する.
Stateはvector<OBMove>と黒から見たwinCount, loseCountを保持する OBMoveはMoveとそのMoveを採用した時のStateのindex ファイル形式 state数 - 4byte State - 16byte * state数 + 黒のwinCount + 白のwinCount + OBMoveの数 + OBMoveの開始index OBMove - 8byte * OBMove数 + Move (4byte) + Stateのindex
Definition at line 98 of file openingBook.h.
osl::record::opening::WinCountBook::WinCountBook | ( | const char * | filename | ) |
Definition at line 13 of file openingBook.cc.
Definition at line 26 of file openingBook.cc.
int osl::record::opening::WinCountBook::getLoseCount | ( | int | stateIndex | ) |
Definition at line 75 of file openingBook.cc.
References osl::record::readInt().
Referenced by printStats().
osl::vector< osl::record::opening::OBMove > osl::record::opening::WinCountBook::getMoves | ( | int | stateIndex | ) |
Definition at line 49 of file openingBook.cc.
References osl::Move::makeDirect(), moves, and osl::record::readInt().
Referenced by printNextMoves().
int osl::record::opening::WinCountBook::getWinCount | ( | int | stateIndex | ) |
Definition at line 68 of file openingBook.cc.
References osl::record::readInt().
Referenced by printStats().
int osl::record::opening::WinCountBook::readInt | ( | ) | [private] |
Definition at line 31 of file openingBook.cc.
Referenced by WinCountBook().
void osl::record::opening::WinCountBook::seek | ( | int | offset | ) | [private] |
Definition at line 43 of file openingBook.cc.
std::ifstream osl::record::opening::WinCountBook::ifs [private] |
Definition at line 101 of file openingBook.h.
Referenced by WinCountBook().
int osl::record::opening::WinCountBook::nStates [private] |
Definition at line 100 of file openingBook.h.
Referenced by WinCountBook().