Go to the documentation of this file.
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) {
127 for (
int i=0;
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 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
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.
Gecode toplevel namespace
Base-class for propagators.
bool isintset(VY y)
Return whether y is an integer set.
Relation may hold or not.
void update(IntSet &y, Space &home, IntSet &py)
void update(Space &home, ViewArray< View > &a)
Update array to be a clone of array a.
void reschedule(Space &home, Propagator &p, IntSet &y)
ViewArray< VX > x
Views still to count.
Home class for posting propagators
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)
ViewBase(Space &home, ViewBase &p)
Constructor for cloning p.
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.
Gecode::IntArgs i({1, 2, 3, 4})
int p
Number of positive literals for node type.