PiecePairEvalTable の添字計算. More...
#include <piecePairIndex.h>

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 |
PiecePairEvalTable の添字計算.
キャッシュのヒット率を上げるために,r2246から計算を変更する. r2246以降では片方あるいは両方がSquare::STAND()の場合は tableの中身が0であるとして,差分計算の対象から外す.
Definition at line 21 of file piecePairIndex.h.
| 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().
| void osl::eval::ppair::PiecePairIndex::forEachRelation | ( | F | 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] |
Definition at line 33 of file piecePairIndex.h.
References maxPieceIndex.
Referenced by canonicalIndexOf(), osl::eval::ppair::PiecePairEvalTableBase< PiecePairPieceTable >::diffAfterCaptureMove(), osl::eval::ppair::PiecePairEvalTableBase< PiecePairPieceTable >::diffAfterDropMove(), osl::eval::ppair::PiecePairEvalTableBase< PiecePairPieceTable >::diffAfterSimpleMove(), osl::eval::ppair::PiecePairEvalTableBase< PiecePairPieceTable >::diffWithUpdate(), indexOf(), indexOfPieceNum(), selfIndexOf(), and osl::eval::ppair::PiecePairTable< signed char >::valueOf().
| 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] |
| 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().
const unsigned int osl::eval::ppair::PiecePairIndex::maxPairIndex = maxPieceIndex*maxPieceIndex [static] |
Definition at line 26 of file piecePairIndex.h.
const unsigned int osl::eval::ppair::PiecePairIndex::maxPieceIndex = maxSquareIndex*maxPtypeOIndex [static] |
Definition at line 25 of file piecePairIndex.h.
Referenced by indexOf(), and meltIndex().
const unsigned int osl::eval::ppair::PiecePairIndex::maxPtypeOIndex = PTYPEO_SIZE [static] |
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().
1.7.6.1