osl::eval::ml::BishopEffectBase Class Reference

`#include <majorPiece.h>`

Inheritance diagram for osl::eval::ml::BishopEffectBase:

## Public Types

enum | { ONE_DIM = 612 , DIM = ONE_DIM * 2 }

## Static Public Member Functions

static MultiInt | eval (const NumEffectState &state)

## Static Protected Member Functions

template<Player P>
static MultiInt | evalOne (const NumEffectState &state, Square bishop, Square myKing, Square opKing, Square ulp, Square urp, Square dlp, Square drp, bool isP)
static int | index (int x_diff, int y_diff, bool ur, bool promoted)
static int | index0 (int x_diff, int y_diff, PtypeO ptypeO, bool ur, bool promoted)
static int | index1 (Square king, Square from, PtypeO ptypeO, bool isP)
| 黒の角(馬)からの利きのある駒のindex {attack,defense}_{ul,ur,dl,dr} へのアクセスに使う from - 駒の位置 king - 玉の位置 ptypeO - 駒の種類，白からの利きの場合は反転． (BLACK,PTYPE_EDGE)もあり得る isP - 馬の場合
static int | index1 (int x_diff, int y_diff, PtypeO ptypeO, bool isP)
| 黒の角(馬)からの利きのある駒のindex {attack,defense}_{ul,ur,dl,dr} へのアクセスに使う (x_diff, y_diff) - 玉を基準に見た駒の相対位置 ptypeO - 駒の種類，白からの利きの場合は反転． (BLACK,PTYPE_EDGE)もあり得る isP - 馬の場合
static int | index2 (Square king, Square from, bool isP)
| 黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス king - 玉の位置 from - 角(馬)の位置 isP - 馬の場合
static int | index2 (int x_diff, int y_diff, bool isP)
| 黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス (x_diff, y_diff) - 玉を基準にしてみた角(馬)の相対位置 isP - 馬の場合

## Static Protected Attributes

static CArray< MultiInt, 612 > | attack_table
static CArray< MultiInt, 612 > | defense_table
static CArray< MultiInt, 32 > | piece_table
static CArray< MultiInt, 23104 > | attack_ur
static CArray< MultiInt, 23104 > | attack_ul
static CArray< MultiInt, 23104 > | attack_dr
static CArray< MultiInt, 23104 > | attack_dl
static CArray< MultiInt, 23104 > | defense_ur
static CArray< MultiInt, 23104 > | defense_ul
static CArray< MultiInt, 23104 > | defense_dr
static CArray< MultiInt, 23104 > | defense_dl
static CArray< MultiInt, 722 > | attack_nospace
static CArray< MultiInt, 722 > | defense_nospace

## Friends

class | BishopEffectPiece

## Detailed Description

Definition at line 306 of file majorPiece.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 310 of file majorPiece.h.

## Member Function Documentation

## eval()

MultiInt osl::eval::ml::BishopEffectBase::eval | ( | const NumEffectState & | state | ) |

static

Definition at line 522 of file majorPiece.cc.

References osl::BLACK, osl::DL, osl::DR, evalOne(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::SimpleState::kingSquare(), osl::NumEffectState::mobilityOf(), osl::Piece::owner(), osl::SimpleState::pieceOf(), osl::Piece::square(), osl::UL, osl::UR, and osl::WHITE.

Referenced by osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), and osl::eval::ml::OpenMidEndingEval::updateSub().

## evalOne()

template<osl::Player P>

MultiInt osl::eval::ml::BishopEffectBase::evalOne | ( | const NumEffectState & | state,
|  | Square | bishop,
|  | Square | myKing,
|  | Square | opKing,
|  | Square | ulp,
|  | Square | urp,
|  | Square | dlp,
|  | Square | drp,
|  | bool | isP )

inline static protected

Definition at line 480 of file majorPiece.cc.

References attack_dl, attack_dr, attack_nospace, attack_ul, attack_ur, defense_dl, defense_dr, defense_nospace, defense_ul, defense_ur, index1(), index2(), osl::SimpleState::pieceAt(), osl::Piece::ptypeO(), osl::Square::rotate180(), osl::Square::rotate180EdgeOK(), and osl::WHITE.

Referenced by eval().

## index()

int osl::eval::ml::BishopEffectBase::index | ( | int | x_diff,
|  | int | y_diff,
|  | bool | ur,
|  | bool | promoted )

inline static protected

Definition at line 323 of file majorPiece.h.

Referenced by index1(), index2(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## index0()

int osl::eval::ml::BishopEffectBase::index0 | ( | int | x_diff,
|  | int | y_diff,
|  | PtypeO | ptypeO,
|  | bool | ur,
|  | bool | promoted )

inline static protected

Definition at line 329 of file majorPiece.h.

References osl::PTYPEO_MIN.

Referenced by osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## index1() [1/2]

int osl::eval::ml::BishopEffectBase::index1 | ( | int | x_diff,
|  | int | y_diff,
|  | PtypeO | ptypeO,
|  | bool | isP )

inline static protected

黒の角(馬)からの利きのある駒のindex {attack,defense}_{ul,ur,dl,dr} へのアクセスに使う (x_diff, y_diff) - 玉を基準に見た駒の相対位置 ptypeO - 駒の種類，白からの利きの場合は反転． (BLACK,PTYPE_EDGE)もあり得る isP - 馬の場合

Definition at line 359 of file majorPiece.h.

References osl::getPtype(), index(), osl::PTYPE_EMPTY, and osl::PTYPEO_MIN.

## index1() [2/2]

int osl::eval::ml::BishopEffectBase::index1 | ( | Square | king,
|  | Square | from,
|  | PtypeO | ptypeO,
|  | bool | isP )

inline static protected

黒の角(馬)からの利きのある駒のindex {attack,defense}_{ul,ur,dl,dr} へのアクセスに使う from - 駒の位置 king - 玉の位置 ptypeO - 駒の種類，白からの利きの場合は反転． (BLACK,PTYPE_EDGE)もあり得る isP - 馬の場合

Definition at line 345 of file majorPiece.h.

References index1(), osl::Square::x(), and osl::Square::y().

Referenced by evalOne(), index1(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## index2() [1/2]

int osl::eval::ml::BishopEffectBase::index2 | ( | int | x_diff,
|  | int | y_diff,
|  | bool | isP )

inline static protected

黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス (x_diff, y_diff) - 玉を基準にしてみた角(馬)の相対位置 isP - 馬の場合

Definition at line 386 of file majorPiece.h.

References index().

## index2() [2/2]

int osl::eval::ml::BishopEffectBase::index2 | ( | Square | king,
|  | Square | from,
|  | bool | isP )

inline static protected

黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス king - 玉の位置 from - 角(馬)の位置 isP - 馬の場合

Definition at line 374 of file majorPiece.h.

References index2(), osl::Square::x(), and osl::Square::y().

Referenced by evalOne(), index2(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## Friends And Related Symbol Documentation

## BishopEffectPiece

friend class BishopEffectPiece

friend

Definition at line 308 of file majorPiece.h.

References BishopEffectPiece.

Referenced by BishopEffectPiece.

## Member Data Documentation

## attack_dl

osl::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::attack_dl

static protected

Definition at line 399 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## attack_dr

osl::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::attack_dr

static protected

Definition at line 398 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## attack_nospace

osl::CArray< MultiInt, 722 > osl::eval::ml::BishopEffectBase::attack_nospace

static protected

Definition at line 404 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## attack_table

osl::CArray< MultiInt, 612 > osl::eval::ml::BishopEffectBase::attack_table

static protected

Definition at line 393 of file majorPiece.h.

Referenced by osl::eval::ml::BishopEffect::setUp(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## attack_ul

osl::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::attack_ul

static protected

Definition at line 397 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## attack_ur

osl::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::attack_ur

static protected

Definition at line 396 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## defense_dl

osl::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::defense_dl

static protected

Definition at line 403 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## defense_dr

osl::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::defense_dr

static protected

Definition at line 402 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## defense_nospace

osl::CArray< MultiInt, 722 > osl::eval::ml::BishopEffectBase::defense_nospace

static protected

Definition at line 405 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## defense_table

osl::CArray< MultiInt, 612 > osl::eval::ml::BishopEffectBase::defense_table

static protected

Definition at line 394 of file majorPiece.h.

Referenced by osl::eval::ml::BishopEffect::setUp(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## defense_ul

osl::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::defense_ul

static protected

Definition at line 401 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## defense_ur

osl::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::defense_ur

static protected

Definition at line 400 of file majorPiece.h.

Referenced by evalOne(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

## piece_table

osl::CArray< MultiInt, 32 > osl::eval::ml::BishopEffectBase::piece_table

static protected

Definition at line 395 of file majorPiece.h.

Referenced by osl::eval::ml::BishopEffectPiece::setUp(), and osl::eval::ml::BishopEffectPieceKingRelative::setUp().

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

- majorPiece.h
- majorPiece.cc