36#ifndef __GECODE_INT_COUNT_HH__
37#define __GECODE_INT_COUNT_HH__
131namespace Gecode {
namespace Int {
namespace Count {
137 template<
class VX,
class VY>
171 template<
class VX,
class VY>
201 template<
class VX,
class VY>
231 template<
class VX,
class VY>
259namespace Gecode {
namespace Int {
namespace Count {
265 template<
class VX,
class VY,
class VZ>
308 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
343 template<
class VX,
class VY,
class VZ,
bool shr>
378 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
Home class for posting propagators
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Create copy during cloning.
EqInt(Space &home, EqInt &p)
Constructor for cloning p.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Create copy during cloning.
EqView(Space &home, EqView &p)
Constructor for cloning p.
GqInt(Space &home, GqInt &p)
Constructor for cloning p.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Create copy during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
virtual Actor * copy(Space &home)
Create copy during cloning.
GqView(Space &home, GqView &p)
Constructor for cloning p.
IntBase(Space &home, IntBase &p)
Constructor for cloning p.
int n_s
Views from x[0] ... x[n_s-1] have subscriptions.
ViewArray< VX > x
Views still to count.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
int c
Number of views which are equal and have been eliminated.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual void reschedule(Space &home)
Schedule function.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
LqInt(Space &home, LqInt &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Create copy during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
virtual Actor * copy(Space &home)
Create copy during cloning.
LqView(Space &home, LqView &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int atleast(void) const
How many views are at least equal.
ViewArray< VX > x
Views still to count.
void count(Space &home)
Count how many views are equal now.
virtual void reschedule(Space &home)
Schedule function.
VZ z
View which yields result of counting.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
int atmost(void) const
How many views are at most equal.
int c
Number of views which are equal and have been eliminated.
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.
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 propagators.
ModEventDelta med
A set of modification events (used during propagation)
Propagator(Home home)
Constructor for posting.
int ModEventDelta
Modification event deltas.
void cancel(Space &home, Propagator &p, VY y)
Cancel propagator p for view y.
void update(VY &y, Space &home, bool shared, VY py)
Update view y from py.
ExecStatus prune(Home home, ViewArray< VX > &x, VX y)
Prune that y is the union of x.
bool isval(VY y)
Return whether y is a value.
ExecStatus post_false(Home home, ViewArray< VX > &x, VX y)
Post that all views in x are not equal to y.
ExecStatus post_true(Home home, ViewArray< VX > &x, VX y)
Post that all views in x are equal to y.
bool isintset(VY y)
Return whether y is an integer set.
void subscribe(Space &home, Propagator &p, VY y)
Subscribe propagator p to view y.
void reschedule(Space &home, Propagator &p, VY y)
Schedule propagator p for view y.
bool shared(const IntSet &, VX)
RelTest holds(VX x, VX y)
Test whether x and y are equal.
RelTest
Result of testing relation.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar y
Post propagator for SetVar x