Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
osl
container
moveLogProbVector.h
Go to the documentation of this file.
1
#ifndef OSL_MOVE_LOG_PROB_VECTOR_H
2
#define OSL_MOVE_LOG_PROB_VECTOR_H
3
#include "
osl/moveLogProb.h
"
4
5
#include "
osl/misc/fixedCapacityVector.h
"
6
#include <iosfwd>
7
8
namespace
osl
9
{
10
namespace
container
11
{
12
typedef
FixedCapacityVector<MoveLogProb,Move::MaxUniqMoves>
MoveLogProbVectorBase
;
13
14
class
MoveLogProbVector
:
public
MoveLogProbVectorBase
15
{
16
typedef
MoveLogProbVectorBase
base_t
;
17
public
:
18
MoveLogProbVector
() {}
19
explicit
MoveLogProbVector
(
size_t
size) :
MoveLogProbVectorBase
(size)
20
{
21
}
22
MoveLogProbVector
(
const
MoveLogProbVector
& src) :
MoveLogProbVectorBase
(src)
23
{
24
}
25
template
<
class
RangeIterator>
26
MoveLogProbVector
(
const
RangeIterator& first,
const
RangeIterator& last)
27
:
MoveLogProbVectorBase
(first, last)
28
{
29
}
30
void
push_back
(
Move
move,
int
prob) {
31
base_t::push_back(
MoveLogProb
(move,prob));
32
}
33
void
push_back
(
const
MoveLogProb
& move) {
34
base_t::push_back(move);
35
}
36
template
<
class
RangeIterator>
37
void
push_back
(
const
RangeIterator& first,
const
RangeIterator& last)
38
{
39
MoveLogProbVectorBase::push_back(first, last);
40
}
42
void
sortByProbability
();
44
void
sortByProbabilityReverse
();
45
const
MoveLogProb
*
find
(
Move
)
const
;
46
};
47
std::ostream&
operator<<
(std::ostream& os,MoveLogProbVector
const
& mv);
48
bool
operator==
(
const
MoveLogProbVector& l,
const
MoveLogProbVector& r);
49
50
}
// namespace container
51
using
container::MoveLogProbVector;
52
}
// namespace osl
53
#endif // OSL_MOVE_LOG_PROB_VECTOR_H
54
// ;;; Local Variables:
55
// ;;; mode:c++
56
// ;;; c-basic-offset:2
57
// ;;; coding:utf-8
58
// ;;; End:
Generated on Sun Jul 21 2013 13:37:25 by
1.8.4