40 namespace Gecode {
namespace Int {
42 template<
class TaskView, SortTaskOrder sto,
bool inc>
46 template<
class TaskView, SortTaskOrder sto,
bool inc>
50 : map(r.alloc<int>(t.
size())),
i(t.
size()-1) {
51 sort<TaskView,sto,!inc>(map,
t);
54 template<
class TaskView, SortTaskOrder sto,
bool inc>
59 template<
class TaskView, SortTaskOrder sto,
bool inc>
64 template<
class TaskView, SortTaskOrder sto,
bool inc>
70 template<
class TaskView, SortTaskOrder sto,
bool inc>
77 template<
class OptTaskView, SortTaskOrder sto,
bool inc>
82 for (
int j=t.
size(); j--; )
85 sort<OptTaskView,sto,!inc>(map,
i,
t);
int left(void) const
How many tasks are left to be iterated.
ManTaskViewIter(Region &r, const TaskViewArray< OptTaskView > &t)
Initialize iterator with mandatory tasks.
void operator++(void)
Move iterator to next task.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
bool operator()(void) const
Test whether iterator is still at a task.
TaskViewIter(void)
Default constructor (no initialization)
Gecode::IntArgs i(4, 1, 2, 3, 4)
unsigned int size(I &i)
Size of all ranges of range iterator i.
int size(void) const
Return size of array (number of elements)
int task(void) const
Return current task position.
Gecode toplevel namespace