osl::container::MoveStack Class Reference

Move のstack. More...

`#include <moveStack.h>`

## Public Member Functions

| MoveStack ()
| ~MoveStack ()
void | reserve (size_t)
void | clear ()
void | push (Move m)
void | pop ()
bool | hasLastMove (size_t last=1) const
const Move | lastMove (size_t last=1) const
size_t | size () const
void | dump (size_t last_n=0) const
void | dump (std::ostream &, size_t last_n=0) const
bool | operator== (const MoveStack &r) const

## Private Types

typedef std::vector< Move > | vector_t

## Private Attributes

vector_t | data

## Detailed Description

Move のstack.

主に探索で今までにさされた指手を保存するのに使用. size() == 0 の時に lastMove と lastMove(2) は Move::INVALID() を返す.

Definition at line 14 of file moveStack.h.

## Member Typedef Documentation

## vector_t

typedef std::vector<Move> osl::container::MoveStack::vector_t

private

Definition at line 16 of file moveStack.h.

## Constructor & Destructor Documentation

## MoveStack()

osl::MoveStack::MoveStack | ( |  | ) |

Definition at line 5 of file moveStack.cc.

References clear(), and data.

Referenced by operator==().

## ~MoveStack()

osl::MoveStack::~MoveStack | ( |  | ) |

Definition at line 11 of file moveStack.cc.

## Member Function Documentation

## clear()

void osl::MoveStack::clear | ( |  | ) |

Definition at line 20 of file moveStack.cc.

References data, and osl::Move::INVALID().

Referenced by MoveStack().

## dump() [1/2]

void osl::MoveStack::dump | ( | size_t | last_n = 0 | ) | const

Parameters

  last_n | 最後のn個を表示，0なら全て．

Definition at line 43 of file moveStack.cc.

References dump().

Referenced by dump().

## dump() [2/2]

void osl::MoveStack::dump | ( | std::ostream & | os,
|  | size_t | last_n = 0 ) const

Definition at line 28 of file moveStack.cc.

References data, osl::csa::show(), and size().

## hasLastMove()

bool osl::container::MoveStack::hasLastMove | ( | size_t | last = 1 | ) | const

inline

Parameters

  last | lastLastMove if 2

Definition at line 27 of file moveStack.h.

References size().

Referenced by osl::rating::TakeBackGroup::findMatch(), osl::rating::DropCapturedGroup::findMatchWithoutProgress(), osl::rating::BigramAttack::index(), osl::move_probability::ContinueCapture::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::DropAfterOpposingPawn::match(), osl::move_probability::DropCaptured::match(), osl::move_probability::SacrificeAttack::match(), osl::move_probability::TakeBackFeature::match(), osl::rating::ContinueCapture::match(), osl::rating::DropCaptured::match(), osl::rating::TakeBack2::match(), osl::rating::TakeBack::match(), osl::move_probability::PatternCommon::updateCacheOne(), and osl::checkmate::DualDfpn::writeRootHistory().

## lastMove()

const Move osl::container::MoveStack::lastMove | ( | size_t | last = 1 | ) | const

inline

Definition at line 28 of file moveStack.h.

References data.

Referenced by osl::rating::ChaseGroup::findMatch(), osl::rating::TakeBackGroup::findMatch(), osl::rating::DropCapturedGroup::findMatchWithoutProgress(), osl::rating::ImmediateEscapeGroup::findMatchWithoutProgress(), osl::rating::BigramAttack::index(), osl::rating::ImmediateAddSupport::index(), osl::move_probability::ContinueCapture::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::DropAfterOpposingPawn::match(), osl::move_probability::DropCaptured::match(), osl::move_probability::SacrificeAttack::match(), osl::move_probability::TakeBackFeature::match(), osl::rating::Chase::match(), osl::rating::ContinueCapture::match(), osl::rating::DropCaptured::match(), osl::rating::ImmediateAddSupport::match(), osl::rating::ImmediateEscape::match(), osl::rating::PawnAttack::match(), osl::rating::TakeBack2::match(), osl::rating::TakeBack::match(), osl::move_probability::PatternCommon::updateCacheOne(), and osl::checkmate::DualDfpn::writeRootHistory().

## operator==()

bool osl::container::MoveStack::operator== | ( | const MoveStack & | r | ) | const

inline

Definition at line 40 of file moveStack.h.

References data, and MoveStack().

## pop()

void osl::container::MoveStack::pop | ( |  | ) |

inline

Definition at line 25 of file moveStack.h.

References data.

## push()

void osl::container::MoveStack::push | ( | Move | m | ) |

inline

Definition at line 24 of file moveStack.h.

References data.

## reserve()

void osl::MoveStack::reserve | ( | size_t | capacity | ) |

Definition at line 15 of file moveStack.cc.

References data.

## size()

size_t osl::container::MoveStack::size | ( |  | ) | const

inline

Definition at line 34 of file moveStack.h.

References data.

Referenced by dump(), and hasLastMove().

## Member Data Documentation

## data

vector_t osl::container::MoveStack::data

private

Definition at line 17 of file moveStack.h.

Referenced by clear(), dump(), lastMove(), MoveStack(), operator==(), pop(), push(), reserve(), and size().

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

- moveStack.h
- moveStack.cc