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