All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
osl::record::opening::WinCountBook Class Reference

StateとOBMoveを保持する. More...

#include <openingBook.h>

Public Member Functions

 WinCountBook (const char *filename)
 
 ~WinCountBook ()
 
int getWinCount (int stateIndex)
 
int getLoseCount (int stateIndex)
 
vector< OBMovegetMoves (int stateIndex)
 

Private Member Functions

int readInt ()
 
void seek (int offset)
 

Private Attributes

int nStates
 
std::ifstream ifs
 

Detailed Description

StateとOBMoveを保持する.

Stateはvector<OBMove>と黒から見たwinCount, loseCountを保持する OBMoveはMoveとそのMoveを採用した時のStateのindex ファイル形式 state数 - 4byte State - 16byte * state数

Definition at line 98 of file openingBook.h.

Constructor & Destructor Documentation

osl::record::opening::WinCountBook::WinCountBook ( const char *  filename)

Definition at line 13 of file openingBook.cc.

References ifs, nStates, and readInt().

osl::record::opening::WinCountBook::~WinCountBook ( )

Definition at line 26 of file openingBook.cc.

Member Function Documentation

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.

Member Data Documentation

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


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