36namespace Gecode {
namespace Int {
38 template<
class TaskView, SortTaskOrder sto,
bool inc>
42 template<
class TaskView, SortTaskOrder sto,
bool inc>
46 : map(
r.alloc<int>(
t.size())), i(
t.size()-1) {
47 sort<TaskView,sto,!inc>(
map,
t);
50 template<
class TaskView, SortTaskOrder sto,
bool inc>
55 template<
class TaskView, SortTaskOrder sto,
bool inc>
60 template<
class TaskView, SortTaskOrder sto,
bool inc>
66 template<
class TaskView, SortTaskOrder sto,
bool inc>
73 template<
class OptTaskView, SortTaskOrder sto,
bool inc>
77 map =
r.alloc<
int>(
t.size()); i=0;
78 for (
int j=0; j<
t.size(); j++)
81 sort<OptTaskView,sto,!inc>(map,i,
t);
Allows to iterate over mandatory task views according to a specified order.
Allows to iterate over task views according to a specified order.
void operator++(void)
Move iterator to next task.
bool operator()(void) const
Test whether iterator is still at a task.
int * map
Map for iteration order.
int task(void) const
Return current task position.
int left(void) const
How many tasks are left to be iterated.
TaskViewIter(void)
Default constructor (no initialization)
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r