osl::eval::ml::Pin Class Reference

`#include <pin.h>`

## Public Types

enum | { DIM = (osl::PTYPE_MAX - osl::PTYPE_PIECE_MIN + 1) * 17 * 9 }

## Public Member Functions

| Pin ()

## Static Public Member Functions

static void | setUp (const Weights &weights, int stage)
static MultiInt | eval (const NumEffectState &state, PieceMask black_mask, PieceMask white_mask)

## Static Private Member Functions

static int | index (const Square king, const Piece piece)

## Static Private Attributes

static CArray2d< MultiInt, PTYPE_SIZE, 17 *9 > | table

## Detailed Description

Definition at line 27 of file pin.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
DIM |

Definition at line 38 of file pin.h.

## Constructor & Destructor Documentation

## Pin()

osl::eval::ml::Pin::Pin | ( |  | ) |

inline

Definition at line 39 of file pin.h.

## Member Function Documentation

## eval()

MultiInt osl::eval::ml::Pin::eval | ( | const NumEffectState & | state,
|  | PieceMask | black_mask,
|  | PieceMask | white_mask )

static

Definition at line 57 of file eval_pin.cc.

References osl::PieceMask::any(), osl::BLACK, index(), osl::SimpleState::kingSquare(), osl::SimpleState::pieceOf(), osl::Piece::ptype(), table, osl::container::PieceMask64::takeOneBit(), and osl::WHITE.

## index()

int osl::eval::ml::Pin::index | ( | const Square | king,
|  | const Piece | piece )

inline static private

Definition at line 29 of file pin.h.

References osl::BLACK, osl::Piece::owner(), osl::Piece::square(), osl::Square::x(), and osl::Square::y().

Referenced by eval().

## setUp()

void osl::eval::ml::Pin::setUp | ( | const Weights & | weights,
|  | int | stage )

static

Definition at line 40 of file eval_pin.cc.

References osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, table, and osl::eval::ml::Weights::value().

## Member Data Documentation

## table

osl::CArray2d< MultiInt, osl::PTYPE_SIZE, 17 *9 > osl::eval::ml::Pin::table

static private

Definition at line 36 of file pin.h.

Referenced by eval(), and setUp().

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

- pin.h
- eval_pin.cc