osl::eval::ppair::PiecePairIndex Struct Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

PiecePairEvalTable の添字計算. More...

`#include <piecePairIndex.h>`

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

## Public Member Functions
template<class F >
void | forEachRelation (F f)

## 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)
| 逆変換 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...

## 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
| ) |  |
| inlinestatic

Definition at line 39 of file piecePairIndex.h.

References indexOf().

template<class F >

static void osl::eval::ppair::PiecePairIndex::forEachRelation | ( | F | f) |  |
| static

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

template<class F >

void osl::eval::ppair::PiecePairIndex::forEachRelation | ( | F | 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
| ) |  |
| inlinestatic

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
| ) |  |
| inlinestatic

Definition at line 62 of file piecePairIndex.h.

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

static unsigned int osl::eval::ppair::PiecePairIndex::indexOf | ( | Piece | piece) |  |
| inlinestatic

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
| ) |  |
| inlinestatic

Definition at line 79 of file piecePairIndex.h.

References indexOf().

static unsigned int osl::eval::ppair::PiecePairIndex::indexOfPieceNum | ( | const SimpleState & | s,
|  | int | id
| ) |  |
| inlinestatic

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
| ) |  |
| inlinestatic

逆変換

Definition at line 46 of file piecePairIndex.h.

References maxPieceIndex.

static void osl::eval::ppair::PiecePairIndex::meltIndex | ( | size_t | index,
|  | Square & | pos,
|  | PtypeO & | ptypeo
| ) |  |
| inlinestatic

逆変換

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) |  |
| inlinestatic

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) |  |
| inlinestatic

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) |  |
| inlinestatic

Definition at line 28 of file piecePairIndex.h.

References indexOf().

## Member Data Documentation

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().

The documentation for this struct was generated from the following file:

- piecePairIndex.h