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

#include <minorPiece.h>

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

List of all members.

Public Types

enum  { ONE_DIM = 64, DIM = ONE_DIM * EvalStages }

Static Public Member Functions

static void setUp (const Weights &weights)
static void eval (const NumEffectState &state, MultiIntPair &out)
template<Player P>
static void evalWithUpdateBang (const NumEffectState &state, Move moved, const CArray< PieceMask, 2 > &effected_mask, MultiIntPair &last_value_and_out)
template<int Sign>
static void adjust (int black_turn_king_attack, int black_turn_king_defense, int white_turn_king_attack, int white_turn_king_defense, MultiIntPair &result)

Static Private Member Functions

static int index (bool same_turn, bool has_support, Ptype ptype)
template<bool Attack>
static int indexK (Square king, bool same_turn, bool has_support, Square position, Player owner, Ptype ptype)
template<bool Attack>
static int indexK (Square king, bool same_turn, bool has_support, Piece piece)
template<Player Attacked>
static void updateEffectChanged (const NumEffectState &state, const CArray< PieceMask, 2 > &effected_mask, const CArray< PieceMask, 2 > &new_mask, int moved_piece_number, MultiIntPair &result)

Static Private Attributes

static CArray< MultiInt, 64 > table
static CArray< MultiInt, 19584 > king_table

Friends

class NonPawnAttackedKingRelative

Detailed Description

Definition at line 912 of file minorPiece.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
ONE_DIM 
DIM 

Definition at line 916 of file minorPiece.h.


Member Function Documentation

template<int Sign>
void osl::eval::ml::NonPawnAttacked::adjust ( int  black_turn_king_attack,
int  black_turn_king_defense,
int  white_turn_king_attack,
int  white_turn_king_defense,
MultiIntPair result 
) [static]

Definition at line 1135 of file minorPiece.cc.

References osl::BLACK, and osl::WHITE.

Referenced by updateEffectChanged().

void osl::eval::ml::NonPawnAttacked::eval ( const NumEffectState &  state,
MultiIntPair out 
) [static]
template<osl::Player P>
template void osl::eval::ml::NonPawnAttacked::evalWithUpdateBang< WHITE > ( const NumEffectState &  state,
Move  moved,
const CArray< PieceMask, 2 > &  effected_mask,
MultiIntPair last_value_and_out 
) [static]
static int osl::eval::ml::NonPawnAttacked::index ( bool  same_turn,
bool  has_support,
Ptype  ptype 
) [inline, static, private]

Definition at line 932 of file minorPiece.h.

References osl::PTYPE_SIZE.

template<bool Attack>
static int osl::eval::ml::NonPawnAttacked::indexK ( Square  king,
bool  same_turn,
bool  has_support,
Square  position,
Player  owner,
Ptype  ptype 
) [inline, static, private]

Definition at line 938 of file minorPiece.h.

References osl::BLACK, osl::PTYPE_SIZE, osl::Square::x(), and osl::Square::y().

template<bool Attack>
static int osl::eval::ml::NonPawnAttacked::indexK ( Square  king,
bool  same_turn,
bool  has_support,
Piece  piece 
) [inline, static, private]

Definition at line 950 of file minorPiece.h.

References osl::Piece::owner(), osl::Piece::ptype(), and osl::Piece::square().

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

Definition at line 1102 of file minorPiece.cc.

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

template<Player Attacked>
static void osl::eval::ml::NonPawnAttacked::updateEffectChanged ( const NumEffectState &  state,
const CArray< PieceMask, 2 > &  effected_mask,
const CArray< PieceMask, 2 > &  new_mask,
int  moved_piece_number,
MultiIntPair result 
) [inline, static, private]

Definition at line 959 of file minorPiece.h.

References adjust(), osl::alt(), osl::BLACK, osl::Piece::number(), result, and osl::WHITE.


Friends And Related Function Documentation

friend class NonPawnAttackedKingRelative [friend]

Definition at line 914 of file minorPiece.h.


Member Data Documentation

Definition at line 1078 of file minorPiece.h.

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

Definition at line 1077 of file minorPiece.h.

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


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