38 namespace Gecode {
namespace Int {
51 :
n(n0),
t(home.alloc<Task>(
n)) {
79 assert((i >= 0) && (i <
n));
85 assert((i >= 0) && (i <
n));
108 t[
i].update(home,share,a.t[
i]);
112 template<
class Char,
class Traits,
class Task>
113 std::basic_ostream<Char,Traits>&
114 operator <<(std::basic_ostream<Char,Traits>& os,
116 std::basic_ostringstream<Char,Traits> s;
117 s.copyfmt(os); s.width(0);
125 return os << s.str();
132 template<
class TaskView>
137 template<
class TaskView>
143 template<
class TaskView>
149 template<
class TaskView>
152 return static_cast<TaskView&
>(
t[
i]);
154 template<
class TaskView>
157 return static_cast<const TaskView&
>(
t[
i]);
160 template<
class Char,
class Traits,
class TaskView>
161 std::basic_ostream<Char,Traits>&
162 operator <<(std::basic_ostream<Char,Traits>& os,
164 std::basic_ostringstream<Char,Traits> s;
165 s.copyfmt(os); s.width(0);
173 return os << s.str();
int size(void) const
Return size of array (number of elements)
void cancel(Space &home, Propagator &p, IntSet &y)
Base-class for propagators.
TaskArray(void)
Default constructor (array of size 0)
TaskViewArray(TaskArray< Task > &t)
Initialize from task array a.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from space heap.
Task & operator[](int i)
Return task at position i.
int p
Number of positive literals for node type.
void update(Space &, bool share, TaskArray &a)
Update array to be a clone of array a.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
int PropCond
Type for propagation conditions.
void subscribe(Space &home, Propagator &p, IntSet &y)
TaskView & operator[](int i)
Return task view at position i.
int size(void) const
Return size of array (number of elements)
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.
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace
const TaskArray< Task > & operator=(const TaskArray< Task > &a)
Initialize from task array a (share elements)
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.