42 namespace Gecode {
namespace Int {
86 for (
int i =
n;
i--; ) {
87 xs[
i].idx =
i; xs[
i].view = xa[
i];
116 assert((
i >= 0) && (
i <
size()));
123 assert((
i >= 0) && (
i <
size()));
131 for (
int i =
n;
i--; )
132 xs[
i].view.subscribe(home,
p,pc,process);
138 for (
int i =
n;
i--; )
139 xs[
i].view.cancel(home,
p,pc);
145 for (
int i =
n;
i--; )
146 xs[
i].view.reschedule(home,
p,pc);
155 for (
int i=
n;
i--; ) {
156 xs[
i].idx =
a[
i].idx;
157 xs[
i].view.update(home,share,
a[
i].view);
163 template<
class Char,
class Traits,
class View>
164 std::basic_ostream<Char,Traits>&
167 std::basic_ostringstream<Char,Traits> s;
168 s.copyfmt(os); s.width(0);
171 s <<
x[0].idx <<
':' <<
x[0].view;
172 for (
int i=1;
i<
x.size();
i++)
173 s <<
", " <<
x[
i].idx <<
':' <<
x[
i].view;
176 return os << s.str();
void cancel(Space &home, Propagator &p, IntSet &y)
Base-class for propagators.
static IdxView * allocate(Space &home, int n)
Allocate memory for n index-view pairs.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from space heap.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
int p
Number of positive literals for node type.
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)
unsigned int size(I &i)
Size of all ranges of range iterator i.
Passing integer variables.
Passing Boolean variables.
Integer view for integer variables.
Node * x
Pointer to corresponding Boolean expression node.
IdxViewArray(void)
Default constructor.
An array of IdxView pairs.
Gecode toplevel namespace
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatView &x)
Print float variable view.
void reschedule(Space &home, Propagator &p, IntSet &y)
Class to map VarArg type to view.
Class for pair of index and view.
Boolean view for Boolean variables.