osl::eval::ml::RookEffectBase Class Reference

`#include <majorPiece.h>`

Inheritance diagram for osl::eval::ml::RookEffectBase:

## 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 rook, Square myKing, Square opKing, Square up, Square dp, Square rp, Square lp, bool isP)
static int | index (int abs_x_diff, int y_diff, bool horizontal, bool is_promoted)
| (abs_x_diff, y_diff) - 玉を原点とした時の空マスの相対位置 horizontal - 飛車の横利きがある場合 is_promoted - 竜の場合
static int | index0 (int abs_x_diff, int y_diff, PtypeO ptypeO, bool horizontal, bool promoted)
| 黒の飛車(竜)から利きのある駒 (abs_x_diff, y_diff) - 駒を基準にした玉の相対位置 abs_x_diffは絶対値 ptypeO - 駒のptypeO, 白からの場合は反転 horizontal - 飛車の横利きがある場合 is_promoted - 竜の場合
static int | index1 (Square king, Square from, PtypeO ptypeO, bool isP)
| 黒の飛車(竜)からの利きのある駒のindex {attack,defense}_{u,r,l,d} へのアクセスに使う from - 駒の位置 king - 玉の位置 ptypeO - 駒の種類，白からの利きの場合は反転． (BLACK,PTYPE_EDGE)もあり得る isP - 竜の場合
static int | index1 (int x_diff, int y_diff, PtypeO ptypeO, bool isP)
| 黒の飛車(竜)からの利きのある駒のindex {attack,defense}_{u,r,l,d} へのアクセスに使う (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_u
static CArray< MultiInt, 23104 > | attack_d
static CArray< MultiInt, 23104 > | attack_l
static CArray< MultiInt, 23104 > | attack_r
static CArray< MultiInt, 23104 > | defense_u
static CArray< MultiInt, 23104 > | defense_d
static CArray< MultiInt, 23104 > | defense_l
static CArray< MultiInt, 23104 > | defense_r
static CArray< MultiInt, 722 > | attack_nospace
static CArray< MultiInt, 722 > | defense_nospace

## Friends

class | RookEffectPiece

## Detailed Description

Definition at line 155 of file majorPiece.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 159 of file majorPiece.h.

## Member Function Documentation

## eval()

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

static

Definition at line 253 of file majorPiece.cc.

References osl::BLACK, osl::D, evalOne(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::SimpleState::kingSquare(), osl::L, osl::NumEffectState::mobilityOf(), osl::Piece::owner(), osl::SimpleState::pieceOf(), osl::R, osl::Piece::square(), osl::U, 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::RookEffectBase::evalOne | ( | const NumEffectState & | state,
|  | Square | rook,
|  | Square | myKing,
|  | Square | opKing,
|  | Square | up,
|  | Square | dp,
|  | Square | rp,
|  | Square | lp,
|  | bool | isP )

inline static protected

Definition at line 209 of file majorPiece.cc.

References attack_d, attack_l, attack_nospace, attack_r, attack_u, defense_d, defense_l, defense_nospace, defense_r, defense_u, index1(), index2(), osl::SimpleState::pieceAt(), osl::Piece::ptypeO(), osl::Square::rotate180(), osl::Square::rotate180EdgeOK(), osl::WHITE, osl::Square::x(), and osl::Square::y().

Referenced by eval().

## index()

int osl::eval::ml::RookEffectBase::index | ( | int | abs_x_diff,
|  | int | y_diff,
|  | bool | horizontal,
|  | bool | is_promoted )

inline static protected

(abs_x_diff, y_diff) - 玉を原点とした時の空マスの相対位置 horizontal - 飛車の横利きがある場合 is_promoted - 竜の場合

Definition at line 177 of file majorPiece.h.

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

## index0()

int osl::eval::ml::RookEffectBase::index0 | ( | int | abs_x_diff,
|  | int | y_diff,
|  | PtypeO | ptypeO,
|  | bool | horizontal,
|  | bool | promoted )

inline static protected

黒の飛車(竜)から利きのある駒 (abs_x_diff, y_diff) - 駒を基準にした玉の相対位置 abs_x_diffは絶対値 ptypeO - 駒のptypeO, 白からの場合は反転 horizontal - 飛車の横利きがある場合 is_promoted - 竜の場合

Definition at line 190 of file majorPiece.h.

References osl::PTYPEO_MIN.

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

## index1() [1/2]

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

inline static protected

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

Definition at line 219 of file majorPiece.h.

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

## index1() [2/2]

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

inline static protected

黒の飛車(竜)からの利きのある駒のindex {attack,defense}_{u,r,l,d} へのアクセスに使う from - 駒の位置 king - 玉の位置 ptypeO - 駒の種類，白からの利きの場合は反転． (BLACK,PTYPE_EDGE)もあり得る isP - 竜の場合

Definition at line 205 of file majorPiece.h.

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

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

## index2() [1/2]

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

inline static protected

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

Definition at line 246 of file majorPiece.h.

References index().

## index2() [2/2]

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

inline static protected

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

Definition at line 234 of file majorPiece.h.

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

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

## Friends And Related Symbol Documentation

## RookEffectPiece

friend class RookEffectPiece

friend

Definition at line 157 of file majorPiece.h.

References RookEffectPiece.

Referenced by RookEffectPiece.

## Member Data Documentation

## attack_d

osl::CArray< MultiInt, 23104 > osl::eval::ml::RookEffectBase::attack_d

static protected

Definition at line 257 of file majorPiece.h.

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

## attack_l

osl::CArray< MultiInt, 23104 > osl::eval::ml::RookEffectBase::attack_l

static protected

Definition at line 258 of file majorPiece.h.

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

## attack_nospace

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

static protected

Definition at line 264 of file majorPiece.h.

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

## attack_r

osl::CArray< MultiInt, 23104 > osl::eval::ml::RookEffectBase::attack_r

static protected

Definition at line 259 of file majorPiece.h.

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

## attack_table

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

static protected

Definition at line 253 of file majorPiece.h.

Referenced by osl::eval::ml::RookEffect::setUp(), and osl::eval::ml::RookEffectPieceKingRelative::setUp().

## attack_u

osl::CArray< MultiInt, 23104 > osl::eval::ml::RookEffectBase::attack_u

static protected

Definition at line 256 of file majorPiece.h.

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

## defense_d

osl::CArray< MultiInt, 23104 > osl::eval::ml::RookEffectBase::defense_d

static protected

Definition at line 261 of file majorPiece.h.

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

## defense_l

osl::CArray< MultiInt, 23104 > osl::eval::ml::RookEffectBase::defense_l

static protected

Definition at line 262 of file majorPiece.h.

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

## defense_nospace

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

static protected

Definition at line 265 of file majorPiece.h.

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

## defense_r

osl::CArray< MultiInt, 23104 > osl::eval::ml::RookEffectBase::defense_r

static protected

Definition at line 263 of file majorPiece.h.

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

## defense_table

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

static protected

Definition at line 254 of file majorPiece.h.

Referenced by osl::eval::ml::RookEffect::setUp(), and osl::eval::ml::RookEffectPieceKingRelative::setUp().

## defense_u

osl::CArray< MultiInt, 23104 > osl::eval::ml::RookEffectBase::defense_u

static protected

Definition at line 260 of file majorPiece.h.

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

## piece_table

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

static protected

Definition at line 255 of file majorPiece.h.

Referenced by osl::eval::ml::RookEffectPiece::setUp(), and osl::eval::ml::RookEffectPieceKingRelative::setUp().

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

- majorPiece.h
- majorPiece.cc