All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Attributes | List of all members
osl::eval::ppair::PiecePairRawTable Class Reference

#include <piecePairRawEval.h>

Inheritance diagram for osl::eval::ppair::PiecePairRawTable:
Inheritance graph
[legend]
Collaboration diagram for osl::eval::ppair::PiecePairRawTable:
Collaboration graph
[legend]

Public Member Functions

 PiecePairRawTable ()
 
 ~PiecePairRawTable ()
 
bool setUp (const char *filename) const
 一度だけ読み込む More...
 
bool loadFromBinaryFile (const char *filename) const
 バイナリファイルから読み込む. More...
 
void writeInBinaryFile (const char *filename) const
 バイナリファイルに書き出す. More...
 
- Public Member Functions inherited from osl::eval::ppair::PiecePairTable< signed char >
int value (unsigned int i) const
 
value_typevalueOf (unsigned int i1, unsigned int i2)
 
value_typevalueOf (Piece p1, Piece p2)
 
int valueOf (unsigned int i1, unsigned int i2) const
 
int valueOf (Piece p1, Piece p2) const
 
- Public Member Functions inherited from osl::eval::ppair::PiecePairIndex
template<class F >
void forEachRelation (F f)
 

Static Public Attributes

static const PiecePairRawTable Table
 user must initialize this before use More...
 

Additional Inherited Members

- Public Types inherited from osl::eval::ppair::PiecePairTable< signed char >
typedef signed char value_type
 
- Static Public Member Functions inherited from osl::eval::ppair::PiecePairIndex
static unsigned int selfIndexOf (unsigned int i)
 
static unsigned int indexOf (unsigned int i1, unsigned int i2)
 
static unsigned int canonicalIndexOf (unsigned int i1, unsigned int i2)
 
static void meltIndex (size_t index, size_t &i1, size_t &i2)
 逆変換 More...
 
static unsigned int positionIndexOf (Square pos)
 
static unsigned int ptypeOIndexOf (PtypeO ptypeo)
 
static unsigned int indexOf (Square pos, PtypeO ptypeo)
 
static void meltIndex (size_t index, Square &pos, PtypeO &ptypeo)
 逆変換 More...
 
static unsigned int indexOf (Piece piece)
 
static unsigned int indexOf (Piece p1, Piece p2)
 
static unsigned int indexOfPieceNum (const SimpleState &s, int id)
 
template<class F >
static void forEachRelation (F f)
 全ての関係についてfを実行する.重複する関係は訪れない More...
 
- Protected Member Functions inherited from osl::eval::ppair::PiecePairTable< signed char >
 PiecePairTable ()
 
 ~PiecePairTable ()
 
- Protected Attributes inherited from osl::eval::ppair::PiecePairTable< signed char >
CArray< value_type, maxPairIndex > values
 const object に対して,データの変更は不可,読み込みは許可するために mutable にする. More...
 

Detailed Description

Definition at line 15 of file piecePairRawEval.h.

Constructor & Destructor Documentation

osl::eval::ppair::PiecePairRawTable::PiecePairRawTable ( )

Definition at line 36 of file piecePairRawTable.cc.

osl::eval::ppair::PiecePairRawTable::~PiecePairRawTable ( )

Definition at line 41 of file piecePairRawTable.cc.

Member Function Documentation

bool osl::eval::ppair::PiecePairRawTable::loadFromBinaryFile ( const char *  filename) const

バイナリファイルから読み込む.

r2246以降ではファイルイメージとメモリイメージとは,PiecePairIndex が違うので,変換が必要.

Returns
successful load

Definition at line 70 of file piecePairRawTable.cc.

References osl::Square::isPieceStand(), osl::PTYPEO_MIN, osl::PTYPEO_SIZE, and verbose.

bool osl::eval::ppair::PiecePairRawTable::setUp ( const char *  filename) const

一度だけ読み込む

Returns
successful load

Definition at line 116 of file piecePairRawTable.cc.

void osl::eval::ppair::PiecePairRawTable::writeInBinaryFile ( const char *  filename) const

バイナリファイルに書き出す.

r2246以降ではファイルイメージとメモリイメージとは,PiecePairIndex が違うので,変換が必要.

Returns
successful load

Definition at line 46 of file piecePairRawTable.cc.

References osl::PTYPEO_MIN, and osl::PTYPEO_SIZE.

Member Data Documentation

const eval::ppair::PiecePairRawTable osl::eval::ppair::PiecePairRawTable::Table
static

user must initialize this before use

Definition at line 41 of file piecePairRawEval.h.


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