osl::book Namespace Reference

## Classes

class | BookInMemory
struct | opiece_sort
class | OPiece
class | CompactBoard
| SimpleStateよりcompactな局面の表現 More...
class | OMove
struct | OBMove
class | WinCountBook
| StateとOBMoveを保持する. More...
struct | WMove
struct | WMoveSort
| WMoveのWeightによるsort. More...
struct | WMoveMoveSort
| WMoveのMoveによるsort. More...
struct | WMoveWeightMoveSort
| WMoveのWeightとMoveによるsort. More...
class | WeightedBook
| StateとWMoveを保持する. More...
struct | oposition_sort
class | OSquare
| Square, Owner: 9 bits. More...
class | OPSquare
| Square, Owner, Promoted : 10 bits. More...
class | MiniBoard
| More compact board than CompactBoard. More...
class | MiniBoardChar50
| 50 byte の盤面. More...

## Functions

bool | operator== (const CompactBoard &, const CompactBoard &)
| 局面を比較する.
std::ostream & | operator<< (std::ostream &os, const CompactBoard &c)
std::istream & | operator>> (std::istream &os, CompactBoard &c)
int | readInt (std::istream &is)
void | writeInt (std::ostream &os, int n)
std::ostream & | operator<< (std::ostream &, const WMove &w)
std::istream & | operator>> (std::istream &, WMove &w)
bool | operator== (const WMove &l, const WMove &r)
int | fromBase64 (const std::string &base64, MiniBoard &mb)
bool | operator< (const MiniBoardChar50 &, const MiniBoardChar50 &)
bool | operator== (const MiniBoardChar50 &, const MiniBoardChar50 &)

## Function Documentation

## fromBase64()

int osl::book::fromBase64 | ( | const std::string & | base64,
|  | MiniBoard & | mb )

Returns
  0 (success); non-zero (failure)

Definition at line 257 of file miniBoard.cc.

## operator<()

bool osl::book::operator< | ( | const MiniBoardChar50 & | l,
|  | const MiniBoardChar50 & | r )

Definition at line 76 of file miniBoardChar50.cc.

References osl::CArray< T, Capacity >::begin(), osl::book::MiniBoardChar50::data, and osl::CArray< T, Capacity >::end().

## operator<<() [1/2]

std::ostream & osl::book::operator<< | ( | std::ostream & | os,
|  | const WMove & | w )

Definition at line 98 of file openingBook.cc.

References osl::book::WMove::move, osl::book::WMove::stateIndex(), osl::book::WMove::weight, and writeInt().

## operator<<() [2/2]

std::ostream & osl::book::operator<< | ( | std::ostream & | os,
|  | const CompactBoard & | c )

Definition at line 78 of file compactBoard.cc.

References osl::book::CompactBoard::pieces(), osl::book::CompactBoard::turn(), and writeInt().

## operator==() [1/3]

bool osl::book::operator== | ( | const CompactBoard & | lhs,
|  | const CompactBoard & | rhs )

局面を比較する.

将棋としての局面（手番や持ち駒を含む）を比較する. NumEffectState等と異なり駒番号は考慮されない.

Definition at line 72 of file compactBoard.cc.

References osl::book::CompactBoard::pieces(), and osl::book::CompactBoard::turn().

## operator==() [2/3]

bool osl::book::operator== | ( | const MiniBoardChar50 & | l,
|  | const MiniBoardChar50 & | r )

Definition at line 81 of file miniBoardChar50.cc.

References osl::CArray< T, Capacity >::begin(), osl::book::MiniBoardChar50::data, and osl::CArray< T, Capacity >::end().

## operator==() [3/3]

bool osl::book::operator== | ( | const WMove & | l,
|  | const WMove & | r )

inline

Definition at line 109 of file openingBook.h.

References osl::book::WMove::move, osl::book::WMove::stateIndex(), and osl::book::WMove::weight.

## operator>>() [1/2]

std::istream & osl::book::operator>> | ( | std::istream & | is,
|  | WMove & | w )

Definition at line 107 of file openingBook.cc.

References osl::book::WMove::move, readInt(), osl::book::WMove::state_index, and osl::book::WMove::weight.

## operator>>() [2/2]

std::istream & osl::book::operator>> | ( | std::istream & | os,
|  | CompactBoard & | c )

Definition at line 90 of file compactBoard.cc.

References osl::book::CompactBoard::piece_vector, osl::book::CompactBoard::player_to_move, and readInt().

## readInt()

int osl::book::readInt | ( | std::istream & | is | ) |

Definition at line 7 of file openingBook.cc.

Referenced by osl::book::WeightedBook::blackWinCount(), osl::book::WinCountBook::loseCount(), osl::book::WeightedBook::moves(), osl::book::WinCountBook::moves(), operator>>(), operator>>(), osl::misc::toBase64(), osl::book::WeightedBook::WeightedBook(), osl::book::WeightedBook::whiteWinCount(), and osl::book::WinCountBook::winCount().

## writeInt()

void osl::book::writeInt | ( | std::ostream & | os,
|  | int | n )

Definition at line 18 of file openingBook.cc.

Referenced by operator<<(), operator<<(), and osl::misc::toCompactBoard().