All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Member Functions | Static Public Attributes
osl::eval::ppair::PiecePairIndex Struct Reference

PiecePairEvalTable の添字計算. More...

#include <piecePairIndex.h>

Inheritance diagram for osl::eval::ppair::PiecePairIndex:
Inheritance graph
[legend]

List of all members.

Static Public Member Functions

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)
 逆変換
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)
 逆変換
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を実行する.重複する関係は訪れない

Static Public Attributes

static const unsigned int maxSquareIndex = 82
static const unsigned int maxPtypeOIndex = PTYPEO_SIZE
static const unsigned int maxPieceIndex = maxSquareIndex*maxPtypeOIndex
static const unsigned int maxPairIndex = maxPieceIndex*maxPieceIndex

Detailed Description

PiecePairEvalTable の添字計算.

キャッシュのヒット率を上げるために,r2246から計算を変更する. r2246以降では片方あるいは両方がSquare::STAND()の場合は tableの中身が0であるとして,差分計算の対象から外す.

Definition at line 21 of file piecePairIndex.h.


Member Function Documentation

static unsigned int osl::eval::ppair::PiecePairIndex::canonicalIndexOf ( unsigned int  i1,
unsigned int  i2 
) [inline, static]

Definition at line 39 of file piecePairIndex.h.

References indexOf().

template<class F >
void osl::eval::ppair::PiecePairIndex::forEachRelation ( f) [static]

全ての関係についてfを実行する.重複する関係は訪れない

Definition at line 103 of file piecePairIndex.h.

References osl::BLACK, osl::KING, osl::newPtypeO(), osl::PPAWN, osl::PTYPE_MAX, and osl::WHITE.

static unsigned int osl::eval::ppair::PiecePairIndex::indexOf ( unsigned int  i1,
unsigned int  i2 
) [inline, static]
static unsigned int osl::eval::ppair::PiecePairIndex::indexOf ( Square  pos,
PtypeO  ptypeo 
) [inline, static]

Definition at line 62 of file piecePairIndex.h.

References maxSquareIndex, positionIndexOf(), ptypeOIndexOf(), and result.

static unsigned int osl::eval::ppair::PiecePairIndex::indexOf ( Piece  piece) [inline, static]

Definition at line 75 of file piecePairIndex.h.

References indexOf(), osl::Piece::ptypeO(), and osl::Piece::square().

static unsigned int osl::eval::ppair::PiecePairIndex::indexOf ( Piece  p1,
Piece  p2 
) [inline, static]

Definition at line 79 of file piecePairIndex.h.

References indexOf().

static unsigned int osl::eval::ppair::PiecePairIndex::indexOfPieceNum ( const SimpleState &  s,
int  id 
) [inline, static]

Definition at line 84 of file piecePairIndex.h.

References indexOf().

static void osl::eval::ppair::PiecePairIndex::meltIndex ( size_t  index,
size_t &  i1,
size_t &  i2 
) [inline, static]

逆変換

Definition at line 46 of file piecePairIndex.h.

References maxPieceIndex.

static void osl::eval::ppair::PiecePairIndex::meltIndex ( size_t  index,
Square pos,
PtypeO ptypeo 
) [inline, static]

逆変換

Definition at line 69 of file piecePairIndex.h.

References maxSquareIndex, osl::SquareCompressor::melt(), and osl::PTYPEO_MIN.

static unsigned int osl::eval::ppair::PiecePairIndex::positionIndexOf ( Square  pos) [inline, static]

Definition at line 52 of file piecePairIndex.h.

References osl::SquareCompressor::compress(), maxSquareIndex, and result.

Referenced by indexOf().

static unsigned int osl::eval::ppair::PiecePairIndex::ptypeOIndexOf ( PtypeO  ptypeo) [inline, static]

Definition at line 58 of file piecePairIndex.h.

References osl::PTYPEO_MIN.

Referenced by indexOf().

static unsigned int osl::eval::ppair::PiecePairIndex::selfIndexOf ( unsigned int  i) [inline, static]

Definition at line 28 of file piecePairIndex.h.

References indexOf().


Member Data Documentation

Definition at line 26 of file piecePairIndex.h.

Definition at line 25 of file piecePairIndex.h.

Referenced by indexOf(), and meltIndex().

Definition at line 24 of file piecePairIndex.h.

const unsigned int osl::eval::ppair::PiecePairIndex::maxSquareIndex = 82 [static]

Definition at line 23 of file piecePairIndex.h.

Referenced by indexOf(), meltIndex(), and positionIndexOf().


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines