My Project
|
駒番号のビットセット. More...
#include <pieceMask.h>
Public Member Functions | |
PieceMask () | |
PieceMask (const PieceMaskBase &base) | |
void | setMask (int index, mask_t val) |
void | xorMask (int index, mask_t val) |
void | orMask (int index, mask_t val) |
bool | test (int num) const |
void | set (int num) |
void | flip (int num) |
void | reset (int num) |
bool | any () const |
const mask_t | getMask (int num) const |
template<Ptype PTYPE> | |
const mask_t | getMask () const |
unpromote(PTYPE) の駒のbit を*含む*mask_tを取り出す | |
template<Ptype PTYPE> | |
const mask_t | selectBit () const |
unpromote(PTYPE) の駒のbit だけ取り出す | |
template<Ptype PTYPE> | |
void | clearBit () |
unpromote(PTYPE) の駒のbit を消す | |
template<Ptype PTYPE> | |
void | setBit () |
unpromote(PTYPE) の駒のbit を立てる | |
![]() | |
PieceMask64 () | |
PieceMask64 (misc::Mask64 const &m) | |
const misc::Mask64 & | getMask (int) const |
void | resetAll () |
void | setAll () |
PieceMask64 & | operator^= (const PieceMask64 &o) |
PieceMask64 & | operator&= (const PieceMask64 &o) |
PieceMask64 & | operator|= (const PieceMask64 &o) |
PieceMask64 & | operator-= (const PieceMask64 &o) |
PieceMask64 & | operator+= (const PieceMask64 &o) |
bool | none () const |
bool | hasMultipleBit () const |
int | countBit2 () const |
bit の数を2まで数える | |
int | countBit () const |
int | takeOneBit () |
Static Public Member Functions | |
static const mask_t | numToMask (int num) |
![]() | |
static int | numToIndex (int) |
static int | numToOffset (int num) |
Private Member Functions | |
mask_t & | mutableMaskNum (int num) |
const mask_t | getMaskNum (int num) const |
Additional Inherited Members | |
![]() | |
misc::Mask64 & | mutableMask (int) |
![]() | |
Mask64 | mask |
駒番号のビットセット.
64bitのMask64を一つもしくは,32bitのMask32を2枚で表現する. 各メソッドの変数名は num は駒番号に, index はマスクのID(0-1)に用いられている.
Definition at line 20 of file pieceMask.h.
|
inline |
Definition at line 23 of file pieceMask.h.
|
inline |
Definition at line 24 of file pieceMask.h.
|
inline |
Definition at line 57 of file pieceMask.h.
References osl::container::PieceMask64::none().
Referenced by osl::eval::ml::MajorCheckWithCapture::addOne(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::BishopExchangeSilverKing::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::Pin::eval(), osl::eval::ml::SimplePin::eval(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::rating::EscapePinGroup::findMatch(), osl::rating::FeatureSet::generateRating(), osl::effect_util::AdditionalEffect::hasEffect(), osl::NumEffectState::hasEffectByNotPinned(), osl::NumEffectState::hasEffectByNotPinnedAndKing(), osl::rating::PinAttack::index(), osl::rating::PinAttack::match(), osl::move_probability::CoverFork::match(), osl::NumEffectState::selectCheapPiece(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), and osl::move_probability::StateInfo::updatePinnedGenerals().
|
inline |
unpromote(PTYPE) の駒のbit を消す
Definition at line 74 of file pieceMask.h.
References osl::container::PieceMask64::mask, and osl::container::PieceMask64::mutableMask().
Referenced by osl::eval::ml::PiecePairKing::add(), osl::eval::ml::PiecePairKing::addSub(), osl::eval::ml::BishopExchangeSilverKing::eval(), osl::eval::ml::PromotedMinorPieces::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::PiecePairKing::evalOne(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::King25EffectCountCombination::evalOne(), osl::NumEffectState::findThreatenedPiece(), osl::effect_util::AdditionalEffect::hasEffect(), osl::NumEffectState::hasEffectByNotPinnedAndKing(), osl::move_probability::CoverFork::match(), osl::NumEffectState::selectCheapPiece(), osl::eval::ml::PiecePairKing::sub(), osl::progress::ml::NewProgress::updateAttack5x5Pieces(), and osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne().
|
inline |
Definition at line 51 of file pieceMask.h.
References mutableMaskNum(), and numToMask().
Referenced by osl::effect::NumBitmapEffect::makeEffect(), and osl::effect::NumBitmapEffect::playerEffect().
|
inline |
unpromote(PTYPE) の駒のbit を*含む*mask_tを取り出す
Definition at line 62 of file pieceMask.h.
References getMask().
Referenced by osl::effect::NumBitmapEffect::countEffect(), getMask(), getMaskNum(), osl::effect::NumBitmapEffect::hasAny(), and osl::effect::NumBitmapEffect::selectLong().
|
inline |
Definition at line 59 of file pieceMask.h.
References osl::container::PieceMask64::getMask().
Referenced by osl::eval::ml::KnightFork::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::KnightFork::evalWithUpdate(), osl::NumEffectState::findAttackAtStrict(), osl::rating::EscapePinGroup::findMatch(), osl::NumEffectState::findThreatenedPiece(), osl::NumEffectState::forEachOnBoardPtypeStrict(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectByPtypeStrict(), osl::NumEffectState::hasEffectInDirection(), osl::NumEffectState::hasMultipleEffectAt(), osl::rating::ImmediateAddSupport::index(), osl::NumEffectState::longEffectAt(), osl::rating::EscapePin::match(), osl::move_probability::ToEffectLong::match(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::operator&(), osl::operator<<(), osl::operator==(), osl::operator|(), osl::operator~(), osl::NumEffectState::selectCheapPiece(), osl::ki2::show(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), and osl::progress::ml::NewProgress::updatePawnFacing().
|
inlineprivate |
Definition at line 35 of file pieceMask.h.
References getMask(), and osl::container::PieceMask64::numToIndex().
Referenced by test().
|
inlineprivate |
Definition at line 32 of file pieceMask.h.
References osl::container::PieceMask64::mutableMask(), and osl::container::PieceMask64::numToIndex().
|
inlinestatic |
Definition at line 25 of file pieceMask.h.
References osl::container::PieceMask64::numToOffset().
Referenced by flip(), osl::effect::NumBitmapEffect::playerEffect(), osl::effect::NumBitmapEffect::playerEffectMask(), osl::effect::NumBitmapEffect::playerEffectMask(), osl::NumEffectState::prologueCapture(), set(), and test().
|
inline |
Definition at line 42 of file pieceMask.h.
References osl::container::PieceMask64::mutableMask().
Referenced by osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::effect::NumBitmapEffect::makeLongEffect(), osl::effect::NumBitmapEffect::makeLongEffect(), and osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne().
|
inline |
Definition at line 54 of file pieceMask.h.
References mutableMaskNum().
Referenced by osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::checkmate::King8Info::make(), osl::move_probability::ToEffectLong::match(), osl::NumEffectState::prologueCapture(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), and osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne().
|
inline |
unpromote(PTYPE) の駒のbit だけ取り出す
Definition at line 66 of file pieceMask.h.
References osl::container::PieceMask64::mask.
Referenced by osl::eval::ml::KnightFork::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::KnightFork::evalWithUpdate(), osl::NumEffectState::findThreatenedPiece(), osl::NumEffectState::selectCheapPiece(), osl::progress::ml::NewProgress::updateAttack5x5Pieces(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), and osl::progress::ml::NewProgress::updatePawnFacing().
|
inline |
Definition at line 48 of file pieceMask.h.
References mutableMaskNum(), and numToMask().
Referenced by osl::eval::See::findEffectPiecesAfterMove(), osl::NumEffectState::makePinOpenDir(), osl::NumEffectState::NumEffectState(), osl::NumEffectState::prologueSimple(), and osl::move_probability::ToEffect::supportAttack().
|
inline |
unpromote(PTYPE) の駒のbit を立てる
Definition at line 81 of file pieceMask.h.
References osl::container::PieceMask64::mask, and osl::container::PieceMask64::mutableMask().
Referenced by osl::eval::ml::BishopRookFork::eval().
|
inline |
Definition at line 28 of file pieceMask.h.
References osl::container::PieceMask64::mutableMask().
Referenced by osl::effect::NumBitmapEffect::playerEffect().
|
inline |
Definition at line 45 of file pieceMask.h.
References getMaskNum(), and numToMask().
Referenced by osl::book::CompactBoard::CompactBoard(), osl::eval::See::computeValue(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::checkmate::Dfpn::generateCheck(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), osl::NumEffectState::hasEffectByPiece(), osl::hash::HashKey::HashKey(), osl::NumEffectState::isConsistent(), osl::move_classifier::KingOpenMove< P >::isMember(), osl::SimpleState::isOffBoard(), osl::NumEffectState::isOnBoardNum(), osl::NumEffectState::makePinOpenDir(), osl::book::MiniBoard::MiniBoard(), osl::progress::PtypeProgress::PtypeProgress(), osl::move_probability::PatternCommon::updateCacheOne(), and osl::eval::ml::NonPawnAttackedPtype::updateChanged().
|
inline |
Definition at line 39 of file pieceMask.h.
References osl::container::PieceMask64::mutableMask().