osl::eval::ml::RookMobilityAll Class Reference

`#include <mobility.h>`

## Static Public Member Functions

template<int Sign>
static void | adjust (const NumEffectState &, bool promoted, int vertical, int horizontal, Square pos, MultiInt &value)
static void | eval (const NumEffectState &, MultiInt &out)

## Static Private Member Functions

static int | indexX (Square rook, bool promoted, int count, bool vertical)
template<int Sign>
static int | indexY (Square rook, bool promoted, int count, bool vertical)
template<int Sign>
static int | indexXKingX (Square rook, Square king, int count, bool vertical)

## Static Private Attributes

static CArray< MultiInt, 18 > | rook_vertical_table
static CArray< MultiInt, 18 > | rook_horizontal_table
static CArray< MultiInt, 34 > | sum_table
static CArray< MultiInt, 324 > | x_table
static CArray< MultiInt, 324 > | y_table
static CArray< MultiInt, 17 *9 > | sumkingx_table
static CArray< MultiInt, 9 *2 *5 *9 > | xkingx_table

## Friends

class | RookMobility
class | RookMobilityX
class | RookMobilityY
class | RookMobilitySum
class | RookMobilitySumKingX
class | RookMobilityXKingX

## Detailed Description

Definition at line 17 of file mobility.h.

## Member Function Documentation

## adjust()

template<int Sign>

void osl::eval::ml::RookMobilityAll::adjust | ( | const NumEffectState & | state,
|  | bool | promoted,
|  | int | vertical,
|  | int | horizontal,
|  | Square | pos,
|  | MultiInt & | value )

inline static

Definition at line 102 of file mobility.cc.

References osl::BLACK, indexX(), indexXKingX(), indexY(), osl::SimpleState::kingSquare(), rook_horizontal_table, rook_vertical_table, sum_table, sumkingx_table, osl::WHITE, osl::Square::x(), x_table, xkingx_table, and y_table.

Referenced by eval().

## eval()

void osl::eval::ml::RookMobilityAll::eval | ( | const NumEffectState & | state,
|  | MultiInt & | out )

static

Definition at line 144 of file mobility.cc.

References adjust(), osl::BLACK, osl::container::QuadInt::clear(), osl::mobility::RookMobility::countHorizontalAll(), osl::mobility::RookMobility::countVerticalAll(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::Piece::owner(), osl::SimpleState::pieceOf(), and osl::Piece::square().

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

## indexX()

int osl::eval::ml::RookMobilityAll::indexX | ( | Square | rook,
|  | bool | promoted,
|  | int | count,
|  | bool | vertical )

inline static private

Definition at line 33 of file mobility.h.

References osl::Square::x().

Referenced by adjust().

## indexXKingX()

template<int Sign>

int osl::eval::ml::RookMobilityAll::indexXKingX | ( | Square | rook,
|  | Square | king,
|  | int | count,
|  | bool | vertical )

inline static private

Definition at line 50 of file mobility.h.

References osl::Square::rotate180(), and osl::Square::x().

Referenced by adjust().

## indexY()

template<int Sign>

int osl::eval::ml::RookMobilityAll::indexY | ( | Square | rook,
|  | bool | promoted,
|  | int | count,
|  | bool | vertical )

inline static private

Definition at line 42 of file mobility.h.

References osl::Square::y().

Referenced by adjust().

## Friends And Related Symbol Documentation

## RookMobility

friend class RookMobility

friend

Definition at line 19 of file mobility.h.

References RookMobility.

Referenced by RookMobility.

## RookMobilitySum

friend class RookMobilitySum

friend

Definition at line 22 of file mobility.h.

References RookMobilitySum.

Referenced by RookMobilitySum.

## RookMobilitySumKingX

friend class RookMobilitySumKingX

friend

Definition at line 23 of file mobility.h.

References RookMobilitySumKingX.

Referenced by RookMobilitySumKingX.

## RookMobilityX

friend class RookMobilityX

friend

Definition at line 20 of file mobility.h.

References RookMobilityX.

Referenced by RookMobilityX.

## RookMobilityXKingX

friend class RookMobilityXKingX

friend

Definition at line 24 of file mobility.h.

References eval(), and RookMobilityXKingX.

Referenced by RookMobilityXKingX.

## RookMobilityY

friend class RookMobilityY

friend

Definition at line 21 of file mobility.h.

References RookMobilityY.

Referenced by RookMobilityY.

## Member Data Documentation

## rook_horizontal_table

osl::CArray< MultiInt, 18 > osl::eval::ml::RookMobilityAll::rook_horizontal_table

static private

Definition at line 60 of file mobility.h.

Referenced by adjust(), and osl::eval::ml::RookMobility::setUp().

## rook_vertical_table

osl::CArray< MultiInt, 18 > osl::eval::ml::RookMobilityAll::rook_vertical_table

static private

Definition at line 59 of file mobility.h.

Referenced by adjust(), and osl::eval::ml::RookMobility::setUp().

## sum_table

osl::CArray< MultiInt, 34 > osl::eval::ml::RookMobilityAll::sum_table

static private

Definition at line 61 of file mobility.h.

Referenced by adjust(), and osl::eval::ml::RookMobilitySum::setUp().

## sumkingx_table

osl::CArray< MultiInt, 17 *9 > osl::eval::ml::RookMobilityAll::sumkingx_table

static private

Definition at line 64 of file mobility.h.

Referenced by adjust(), and osl::eval::ml::RookMobilitySumKingX::setUp().

## x_table

osl::CArray< MultiInt, 324 > osl::eval::ml::RookMobilityAll::x_table

static private

Definition at line 62 of file mobility.h.

Referenced by adjust(), and osl::eval::ml::RookMobilityX::setUp().

## xkingx_table

osl::CArray< MultiInt, 9 *2 *5 *9 > osl::eval::ml::RookMobilityAll::xkingx_table

static private

Definition at line 65 of file mobility.h.

Referenced by adjust(), and osl::eval::ml::RookMobilityXKingX::setUp().

## y_table

osl::CArray< MultiInt, 324 > osl::eval::ml::RookMobilityAll::y_table

static private

Definition at line 63 of file mobility.h.

Referenced by adjust(), and osl::eval::ml::RookMobilityY::setUp().

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

- mobility.h
- mobility.cc