38 namespace Gecode {
namespace Int {
namespace Channel {
40 template<
class Info,
class Offset, PropCond pc>
44 :
Propagator(home),
n(n0), n_na(2*
n), ox(ox0), oy(oy0), xy(xy0) {
45 for (
int i=2*
n;
i--; )
46 xy[
i].view.subscribe(home,*
this,pc);
49 template<
class Info,
class Offset, PropCond pc>
53 xy(home.alloc<Info>(2*
n)) {
56 for (
int i=2*
n;
i--; )
57 xy[
i].update(home,share,p.
xy[
i]);
60 template<
class Info,
class Offset, PropCond pc>
66 template<
class Info,
class Offset, PropCond pc>
69 for (
int i=2*
n;
i--; )
70 xy[
i].view.cancel(home,*
this,pc);
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
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.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Propagation cost (defined as low quadratic)
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 n
Number of views (actually twice as many for both x and y)
void update(const Offset &o)
Update during cloning.
Converter with fixed offset.
Base-class for channel propagators.
virtual size_t dispose(Space &home)
Delete actor and return its size.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Base(Space &home, bool share, Base< Info, Offset, pc > &p)
Constructor for cloning p.
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
Home class for posting propagators