Public Member Functions | Private Member Functions | Private Attributes | List of all members
osl::book::WinCountBook Class Reference

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

#include <openingBook.h>

Public Member Functions

 WinCountBook (const char *filename)
 
 ~WinCountBook ()
 
int winCount (int stateIndex)
 
int loseCount (int stateIndex)
 
std::vector< OBMovemoves (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 82 of file openingBook.h.

Constructor & Destructor Documentation

§ WinCountBook()

osl::book::WinCountBook::WinCountBook ( const char *  filename)

Definition at line 30 of file openingBook.cc.

References ifs, nStates, readInt(), and ~WinCountBook().

Referenced by osl::book::writeInt().

§ ~WinCountBook()

osl::book::WinCountBook::~WinCountBook ( )

Definition at line 43 of file openingBook.cc.

References readInt().

Referenced by WinCountBook().

Member Function Documentation

§ loseCount()

int osl::book::WinCountBook::loseCount ( int  stateIndex)

Definition at line 92 of file openingBook.cc.

References readInt(), and seek().

Referenced by winCount().

§ moves()

std::vector< osl::book::OBMove > osl::book::WinCountBook::moves ( int  stateIndex)

Definition at line 66 of file openingBook.cc.

References osl::Move::makeDirect(), nStates, readInt(), seek(), and winCount().

Referenced by seek().

§ readInt()

int osl::book::WinCountBook::readInt ( )
private

Definition at line 48 of file openingBook.cc.

References ifs, and seek().

Referenced by loseCount(), moves(), osl::book::operator>>(), winCount(), WinCountBook(), and ~WinCountBook().

§ seek()

void osl::book::WinCountBook::seek ( int  offset)
private

Definition at line 60 of file openingBook.cc.

References ifs, and moves().

Referenced by loseCount(), moves(), readInt(), and winCount().

§ winCount()

int osl::book::WinCountBook::winCount ( int  stateIndex)

Definition at line 85 of file openingBook.cc.

References loseCount(), readInt(), and seek().

Referenced by moves().

Member Data Documentation

§ ifs

std::ifstream osl::book::WinCountBook::ifs
private

Definition at line 85 of file openingBook.h.

Referenced by readInt(), seek(), and WinCountBook().

§ nStates

int osl::book::WinCountBook::nStates
private

Definition at line 84 of file openingBook.h.

Referenced by moves(), and WinCountBook().


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