34 namespace Gecode {
namespace Int {
namespace Channel {
36 template<
class Info,
class Offset, PropCond pc>
40 :
Propagator(home),
n(n0), n_na(2*
n), ox(ox0), oy(oy0), xy(xy0) {
41 for (
int i=2*
n;
i--; )
42 xy[
i].view.subscribe(home,*
this,pc);
45 template<
class Info,
class Offset, PropCond pc>
49 xy(home.alloc<Info>(2*
n)) {
52 for (
int i=2*
n;
i--; )
56 template<
class Info,
class Offset, PropCond pc>
59 return PropCost::quadratic(PropCost::LO, 2*
n);
62 template<
class Info,
class Offset, PropCond pc>
65 for (
int i=2*
n;
i--; )
66 xy[
i].view.reschedule(home,*
this,pc);
69 template<
class Info,
class Offset, PropCond pc>
72 for (
int i=2*
n;
i--; )
73 xy[
i].view.cancel(home,*
this,pc);
74 (void) Propagator::dispose(home);
Base(Space &home, Base< Info, Offset, pc > &p)
Constructor for cloning p.
Offset ox
Offset transformation for x variables.
Base-class for propagators.
Info * xy
View and information for both x and y.
Offset oy
Offset transformation for y variables.
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.
Converter with fixed offset.
Base-class for channel propagators.
Gecode toplevel namespace
void reschedule(Space &home, Propagator &p, IntSet &y)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
void update(IntSet &y, Space &home, IntSet &py)