moveLogProbVector.h
Go to the documentation of this file.
#ifndef OSL_MOVE_LOG_PROB_VECTOR_H
#define OSL_MOVE_LOG_PROB_VECTOR_H
#include "osl/moveLogProb.h"
#include "osl/container.h"
#include <iosfwd>
namespace osl
{
namespace container
{
typedef FixedCapacityVector<MoveLogProb,Move::MaxUniqMoves> MoveLogProbVectorBase;
class MoveLogProbVector : public MoveLogProbVectorBase
{
typedef MoveLogProbVectorBase base_t;
public:
MoveLogProbVector() {}
explicit MoveLogProbVector(size_t size) : MoveLogProbVectorBase(size)
{
}
MoveLogProbVector(const MoveLogProbVector& src) : MoveLogProbVectorBase(src)
{
}
template <class RangeIterator>
MoveLogProbVector(const RangeIterator& first, const RangeIterator& last)
: MoveLogProbVectorBase(first, last)
{
}
void push_back(Move move,int prob) {
base_t::push_back(MoveLogProb(move,prob));
}
void push_back(const MoveLogProb& move) {
base_t::push_back(move);
}
template <class RangeIterator>
void push_back(const RangeIterator& first, const RangeIterator& last)
{
MoveLogProbVectorBase::push_back(first, last);
}
void sortByProbability();
void sortByProbabilityReverse();
const MoveLogProb* find(Move) const;
};
std::ostream& operator<<(std::ostream& os,MoveLogProbVector const& mv);
bool operator==(const MoveLogProbVector& l, const MoveLogProbVector& r);
} // namespace container
using container::MoveLogProbVector;
} // namespace osl
#endif // OSL_MOVE_LOG_PROB_VECTOR_H
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; coding:utf-8
// ;;; End:
osl::FixedCapacityVector
Definition container.h:137
osl::FixedCapacityVector< MoveLogProb, Move::MaxUniqMoves >::size
size_t size() const
Definition container.h:243
osl::FixedCapacityVector< MoveLogProb, Move::MaxUniqMoves >::push_back
void push_back(const MoveLogProb &e)
Definition container.h:204
osl::MoveLogProb
Definition moveLogProb.h:10
osl::Move
圧縮していない moveの表現 .
Definition basic_type.h:1052
osl::container::MoveLogProbVector
Definition moveLogProbVector.h:14
osl::container::MoveLogProbVector::push_back
void push_back(const MoveLogProb &move)
Definition moveLogProbVector.h:32
osl::container::MoveLogProbVector::base_t
MoveLogProbVectorBase base_t
Definition moveLogProbVector.h:15
osl::container::MoveLogProbVector::MoveLogProbVector
MoveLogProbVector(const RangeIterator &first, const RangeIterator &last)
Definition moveLogProbVector.h:25
osl::container::MoveLogProbVector::MoveLogProbVector
MoveLogProbVector(const MoveLogProbVector &src)
Definition moveLogProbVector.h:21
osl::container::MoveLogProbVector::sortByProbabilityReverse
void sortByProbabilityReverse()
確率が低い順にsort
Definition moveLogProbVector.cc:52
osl::container::MoveLogProbVector::push_back
void push_back(Move move, int prob)
Definition moveLogProbVector.h:29
osl::container::MoveLogProbVector::find
const MoveLogProb * find(Move) const
Definition moveLogProbVector.cc:57
osl::container::MoveLogProbVector::sortByProbability
void sortByProbability()
確率が高い順にsort
Definition moveLogProbVector.cc:48
osl::container::MoveLogProbVector::MoveLogProbVector
MoveLogProbVector(size_t size)
Definition moveLogProbVector.h:18
osl::container::MoveLogProbVector::push_back
void push_back(const RangeIterator &first, const RangeIterator &last)
Definition moveLogProbVector.h:36
osl::container::MoveLogProbVector::MoveLogProbVector
MoveLogProbVector()
Definition moveLogProbVector.h:17
container.h
moveLogProb.h
osl::container
Definition bitXmask.h:12
osl::container::MoveLogProbVectorBase
FixedCapacityVector< MoveLogProb, Move::MaxUniqMoves > MoveLogProbVectorBase
Definition moveLogProbVector.h:11
osl::container::operator==
bool operator==(BitXmask l, BitXmask r)
Definition bitXmask.h:33
osl::container::operator<<
std::ostream & operator<<(std::ostream &, const BitXmask)
Definition bitXmask.cc:6
osl
Definition additionalEffect.h:6