All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Static Public Member Functions | Static Public Attributes | Static Private Member Functions
osl::eval::ml::KnightFork Class Reference

#include <minorPiece.h>

Collaboration diagram for osl::eval::ml::KnightFork:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { DROP_DIM = PTYPE_SIZE*PTYPE_SIZE, ONE_DIM = DROP_DIM*2*2, DIM = ONE_DIM * EvalStages }

Static Public Member Functions

static void setUp (const Weights &weights)
template<Player Defense>
static MultiIntPair evalOne (const NumEffectState &state, bool has_knight, BoardMask &knight_fork_squares, std::pair< Square, int > &knight_drop)
static MultiIntPair eval (const NumEffectState &state, CArray< BoardMask, 2 > &knight_fork_squares, CArray< std::pair< Square, int >, 2 > &knight_drop)
template<Player P>
static MultiIntPair evalWithUpdate (const NumEffectState &state, Move moved, CArray< BoardMask, 2 > &knight_fork_squares, CArray< std::pair< Square, int >, 2 > &knight_drop)
static bool isForkSquare (const NumEffectState &state, Player defense, int y, int x0, int x1)
static int index (Ptype a, Ptype b)
static bool isTarget (Ptype ptype)

Static Public Attributes

static CArray< MultiInt, ONE_DIMtable

Static Private Member Functions

template<Player P, Player Defense>
static void updateSquares (const NumEffectState &state, Move moved, BoardMask &knight_fork_squares)
template<osl::Player Defense>
static MultiIntPair accumulate (const NumEffectState &state, bool has_knight, const BoardMask &knight_fork_squares, std::pair< Square, int > &knight_drop)

Detailed Description

Definition at line 1670 of file minorPiece.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
DROP_DIM 
ONE_DIM 
DIM 

Definition at line 1673 of file minorPiece.h.


Member Function Documentation

template<osl::Player Defense>
osl::MultiIntPair osl::eval::ml::KnightFork::accumulate ( const NumEffectState &  state,
bool  has_knight,
const BoardMask &  knight_fork_squares,
std::pair< Square, int > &  knight_drop 
) [static, private]
osl::MultiIntPair osl::eval::ml::KnightFork::eval ( const NumEffectState &  state,
CArray< BoardMask, 2 > &  knight_fork_squares,
CArray< std::pair< Square, int >, 2 > &  knight_drop 
) [static]
template<osl::Player Defense>
osl::MultiIntPair osl::eval::ml::KnightFork::evalOne ( const NumEffectState &  state,
bool  has_knight,
BoardMask &  knight_fork_squares,
std::pair< Square, int > &  knight_drop 
) [static]
template<osl::Player P>
template MultiIntPair osl::eval::ml::KnightFork::evalWithUpdate< WHITE > ( const NumEffectState &  state,
Move  moved,
CArray< BoardMask, 2 > &  knight_fork_squares,
CArray< std::pair< Square, int >, 2 > &  knight_drop 
) [static]

Definition at line 2872 of file minorPiece.cc.

References osl::alt(), osl::BLACK, osl::KNIGHT, result, and osl::WHITE.

static int osl::eval::ml::KnightFork::index ( Ptype  a,
Ptype  b 
) [inline, static]

Definition at line 1695 of file minorPiece.h.

References osl::PTYPE_SIZE.

static bool osl::eval::ml::KnightFork::isForkSquare ( const NumEffectState &  state,
Player  defense,
int  y,
int  x0,
int  x1 
) [static]
static bool osl::eval::ml::KnightFork::isTarget ( Ptype  ptype) [inline, static]

Definition at line 1699 of file minorPiece.h.

References osl::KNIGHT, osl::LANCE, osl::PAWN, and osl::unpromote().

void osl::eval::ml::KnightFork::setUp ( const Weights weights) [static]

Definition at line 2651 of file minorPiece.cc.

References osl::NStages, osl::PTYPE_SIZE, and osl::eval::ml::Weights::value().

template<osl::Player P, osl::Player Defense>
void osl::eval::ml::KnightFork::updateSquares ( const NumEffectState &  state,
Move  moved,
BoardMask &  knight_fork_squares 
) [static, private]

Member Data Documentation

osl::CArray< osl::MultiInt, 256 *2 *2 > osl::eval::ml::KnightFork::table [static]

Definition at line 1691 of file minorPiece.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines