osl::move_probability::ToEffect Class Reference

`#include <feature.h>`

Inheritance diagram for osl::move_probability::ToEffect:

## Public Member Functions

| ToEffect ()
double | match (const StateInfo &state, const MoveInfo &info, int offset, const double *w) const
Public Member Functions inherited from osl::move_probability::Feature
| Feature (std::string n, size_t d)
virtual | ~Feature ()
std::string | name () const
size_t | dimension () const

## Static Public Member Functions

static const Piece | find (const NumEffectState &state, Square to, const PieceMask &remove, Player player)
static void | supportAttack (const NumEffectState &state, Square to, const PieceMask &my_pin, const PieceMask &op_pin, Player turn, std::pair< Ptype, Ptype > &out)
static void | supportAttack (const StateInfo &info, Square to, Move move, std::pair< Ptype, Ptype > &out)
static size_t | supportAttack (const StateInfo &info, Square to, Move move)
Static Public Member Functions inherited from osl::move_probability::Feature
static int | classifyEffect9 (const NumEffectState &state, Player player, Square to)

## Detailed Description

Definition at line 350 of file move_probability/feature.h.

## Constructor & Destructor Documentation

## ToEffect()

osl::move_probability::ToEffect::ToEffect | ( |  | ) |

inline

Definition at line 353 of file move_probability/feature.h.

References osl::move_probability::Feature::Feature(), and osl::PTYPE_SIZE.

## Member Function Documentation

## find()

const Piece osl::move_probability::ToEffect::find | ( | const NumEffectState & | state,
|  | Square | to,
|  | const PieceMask & | remove,
|  | Player | player )

inline static

Definition at line 356 of file move_probability/feature.h.

References osl::NumEffectState::effectSetAt(), osl::Square::isOnBoard(), osl::NumEffectState::piecesOnBoard(), and osl::NumEffectState::selectCheapPiece().

Referenced by supportAttack().

## match()

double osl::move_probability::ToEffect::match | ( | const StateInfo & | state,
|  | const MoveInfo & | info,
|  | int | offset,
|  | const double * | w ) const

inline virtual

Implements osl::move_probability::Feature.

Definition at line 394 of file move_probability/feature.h.

References osl::captured(), osl::Move::capturePtype(), osl::move_probability::Feature::dimension(), osl::move_probability::MoveInfo::move, osl::Move::ptype(), osl::PTYPE_SIZE, supportAttack(), and osl::Move::to().

## supportAttack() [1/3]

void osl::move_probability::ToEffect::supportAttack | ( | const NumEffectState & | state,
|  | Square | to,
|  | const PieceMask & | my_pin,
|  | const PieceMask & | op_pin,
|  | Player | turn,
|  | std::pair< Ptype, Ptype > & | out )

inline static

Definition at line 366 of file move_probability/feature.h.

References osl::alt(), find(), and osl::Piece::ptype().

Referenced by match(), supportAttack(), supportAttack(), and osl::move_probability::PatternCommon::updateCacheOne().

## supportAttack() [2/3]

size_t osl::move_probability::ToEffect::supportAttack | ( | const StateInfo & | info,
|  | Square | to,
|  | Move | move )

inline static

Definition at line 388 of file move_probability/feature.h.

References osl::PTYPE_SIZE, and supportAttack().

## supportAttack() [3/3]

void osl::move_probability::ToEffect::supportAttack | ( | const StateInfo & | info,
|  | Square | to,
|  | Move | move,
|  | std::pair< Ptype, Ptype > & | out )

inline static

Definition at line 376 of file move_probability/feature.h.

References osl::alt(), osl::Move::from(), osl::Move::isDrop(), osl::Piece::number(), osl::SimpleState::pieceAt(), osl::move_probability::StateInfo::pin, osl::PieceMask::set(), osl::move_probability::StateInfo::state, supportAttack(), and osl::SimpleState::turn().

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

- move_probability/feature.h