34 namespace Gecode {
namespace Int {
namespace Count {
36 template<
class VX,
class VY,
class VZ>
48 template<
class VX,
class VY,
class VZ>
57 template<
class VX,
class VY,
class VZ>
63 template<
class VX,
class VY,
class VZ>
71 template<
class VX,
class VY,
class VZ>
83 template<
class VX,
class VY,
class VZ>
104 template<
class VX,
class VY,
class VZ>
110 template<
class VX,
class VY,
class VZ>
121 template<
class VX,
class VY,
class VZ>
124 const VY&
y,
const VZ&
z) {
int atleast(void) const
How many views are at least equal.
Relation may hold or not.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
void update(Space &home, ViewArray< View > &a)
Update array to be a clone of array a.
Actor must always be disposed.
void cancel(Space &home, Propagator &p, IntSet &y)
VZ z
View which yields result of counting.
static bool sharing(const ViewArray< VX > &x, const VY &y, const VZ &z)
Test whether there is sharing of z with x or y.
Base-class for count propagators (view)
RelTest holds(VX x, ConstIntView y)
Test whether x and y are equal.
Base-class for propagators.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
bool shared(const IntSet &, VX)
ViewBase(Space &home, ViewBase &p)
Constructor for cloning p.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
ViewArray< VX > x
Views still to count.
int c
Number of views which are equal and have been eliminated.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
void count(Space &home)
Count how many views are equal now.
void subscribe(Space &home, Propagator &p, IntSet &y)
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to all views.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
Post propagator for SetVar SetOpType SetVar y
virtual void reschedule(Space &home)
Schedule function.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Post propagator for SetVar x
bool isintset(VY y)
Return whether y is an integer set.
int atmost(void) const
How many views are at most equal.
Gecode toplevel namespace
virtual size_t dispose(Space &home)
Delete propagator and return its size.
void reschedule(Space &home, Propagator &p, IntSet &y)
int size(void) const
Return size of array (number of elements)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
#define GECODE_NEVER
Assert that this command is never executed.
void update(IntSet &y, Space &home, IntSet &py)