47 : n(n0), t(home.alloc<
Task>(n)) {
75 assert((i >= 0) && (i < n));
81 assert((i >= 0) && (i < n));
88 for (
int i=0; i<n; i++)
95 for (
int i=0; i<n; i++)
102 for (
int i=0; i<n; i++)
110 for (
int i=0; i<n; i++)
115 template<
class Char,
class Traits,
class Task>
116 std::basic_ostream<Char,Traits>&
119 std::basic_ostringstream<Char,Traits> s;
120 s.copyfmt(os); s.width(0);
124 for (
int i=1; i<t.
size(); i++)
128 return os << s.str();
135 template<
class TaskView>
140 template<
class TaskView>
146 template<
class TaskView>
152 template<
class TaskView>
155 return static_cast<TaskView&
>(
t[i]);
157 template<
class TaskView>
160 return static_cast<const TaskView&
>(
t[i]);
163 template<
class Char,
class Traits,
class TaskView>
164 std::basic_ostream<Char,Traits>&
167 std::basic_ostringstream<Char,Traits> s;
168 s.copyfmt(os); s.width(0);
172 for (
int i=1; i<t.
size(); i++)
176 return os << s.str();
int size(void) const
Return size of array (number of elements)
Task & operator[](int i)
Return task at position i.
void update(Space &, TaskArray &a)
Update array to be a clone of array a.
TaskArray(void)
Default constructor (array of size 0)
void subscribe(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Subscribe propagator p to all tasks.
void cancel(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Cancel subscription of propagator p for all tasks.
void reschedule(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Schedule propagator p.
int size(void) const
Return size of array (number of elements)
const TaskArray< Task > & operator=(const TaskArray< Task > &a)
Initialize from task array a (share elements)
TaskArray< Task > & t
Access to task array.
TaskViewArray(TaskArray< Task > &t)
Initialize from task array a.
int size(void) const
Return size of array (number of elements)
TaskView & operator[](int i)
Return task view at position i.
Base-class for propagators.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from space heap.
void update(const NoOffset &)
Integer-precision integer scale view.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
Gecode toplevel namespace
int PropCond
Type for propagation conditions.