40 #ifndef __GECODE_INT_COUNT_HH__
41 #define __GECODE_INT_COUNT_HH__
50 namespace Gecode {
namespace Int {
namespace Count {
132 namespace Gecode {
namespace Int {
namespace Count {
138 template<
class VX,
class VY>
170 template<
class VX,
class VY>
200 template<
class VX,
class VY>
230 template<
class VX,
class VY>
258 namespace Gecode {
namespace Int {
namespace Count {
264 template<
class VX,
class VY,
class VZ>
305 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
340 template<
class VX,
class VY,
class VZ,
bool shr>
375 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ViewArray< VX > x
Views still to count.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
LqView(Space &home, bool share, LqView &p)
Constructor for cloning p.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
int n_s
Views from x[0] ... x[n_s-1] have subscriptions.
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.
int atleast(void) const
How many views are at least equal.
Base-class for count propagators (view)
RelTest holds(VX x, ConstIntView y)
Test whether x and y are equal.
Base-class for propagators.
Baseclass for count propagators (integer)
ViewTypeDesc
Description of view type.
Propagator for counting views (equal to number of equal views)
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
EqInt(Space &home, bool share, EqInt &p)
Constructor for cloning p.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
Base-class for both propagators and branchers.
Propagator for counting views (less or equal integer to number of equal views)
Propagator for counting views (greater or equal to number of equal views)
EqView(Space &home, bool share, EqView &p)
Constructor for cloning p.
int p
Number of positive literals for node type.
ViewBase(Space &home, bool share, ViewBase &p)
Constructor for cloning p.
Propagator for counting views (equal integer to number of equal views)
ViewArray< VX > x
Views still to count.
int c
Number of views which are equal and have been eliminated.
RelTest
Result of testing relation.
void count(Space &home)
Count how many views are equal now.
void subscribe(Space &home, Propagator &p, IntSet &y)
ViewTypeDesc vtd(VY y)
Return the view type description of y.
GqInt(Space &home, bool share, GqInt &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
ModEventDelta med
A set of modification events (used during propagation)
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
Propagator for counting views (less or equal to number of equal views)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
int c
Number of views which are equal and have been eliminated.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
Propagator for counting views (greater or equal integer to number of equal views) ...
int atmost(void) const
How many views are at most equal.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Node * x
Pointer to corresponding Boolean expression node.
IntBase(Space &home, bool share, IntBase &p)
Constructor for cloning p.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
LqInt(Space &home, bool share, LqInt &p)
Constructor for cloning p.
Gecode toplevel namespace
ExecStatus post_false(Home home, VX x, ConstIntView y)
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
int ModEventDelta
Modification event deltas.
Home class for posting propagators
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
GqView(Space &home, bool share, GqView &p)
Constructor for cloning p.
ExecStatus post_true(Home home, VX x, ConstIntView y)