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< OBMove > | moves (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数

- 黒のwinCount
- 白のwinCount
- OBMoveの数
- OBMoveの開始index OBMove - 8byte * OBMove数
- Move (4byte)
- Stateのindex

Definition at line 82 of file openingBook.h.

## Constructor & Destructor Documentation

## WinCountBook()

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

Definition at line 29 of file openingBook.cc.

References ifs, nStates, and readInt().

## ~WinCountBook()

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

Definition at line 42 of file openingBook.cc.

## Member Function Documentation

## loseCount()

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

Definition at line 91 of file openingBook.cc.

References osl::book::readInt(), and seek().

## moves()

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

Definition at line 65 of file openingBook.cc.

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

Referenced by moves().

## readInt()

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

private

Definition at line 47 of file openingBook.cc.

References ifs.

Referenced by WinCountBook().

## seek()

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

private

Definition at line 59 of file openingBook.cc.

References ifs.

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

## winCount()

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

Definition at line 84 of file openingBook.cc.

References osl::book::readInt(), and seek().

## 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:

- openingBook.h
- openingBook.cc