43 namespace Gecode {
namespace Int {
namespace GCC {
53 int m = l + (r -
l) / 2;
54 if (v == a[m].
card()) {
58 }
else if (v < a[m].
card()) {
168 unsigned int size(
void)
const;
172 int card(
void)
const;
219 _min =
min; _max=
max; _card =
c; _counter = 0;
250 if (++_counter > _max)
268 if ((_min > n) || (_max < n))
280 _min=x._min; _max=x._max; _card=x._card; _counter=x._counter;
CardView(void)
Default constructor.
bool assigned(void) const
void update(Space &home, bool share, CardView &x)
int card(void) const
Return cardinality.
static const bool propagate
This view does require propagation.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Constant view containing lower and upper cardinality bounds.
bool lookupValue(T &a, int v, int &i)
Return index of v in array a.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
ViewRanges(void)
Default constructor.
int ModEvent
Type for modification events.
Base-class for propagators.
Range iterator for integer variable views
unsigned int size(void) const
Return size (cardinality) of domain.
const unsigned int card
Maximum cardinality of an integer set.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
void init(const View &x)
Initialize with ranges for view x.
Base-class for derived views.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Range iterator for integer views.
int max(void) const
Return maximum of domain.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
Gecode::FloatVal c(-8, 8)
CardConst(void)
Default constructor.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int min(void) const
Return minimum of domain.
int n
Number of negative literals for node type.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
static const bool propagate
This view does not require propagation.
View base(void) const
Return view from which this view is derived.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
unsigned int size(void) const
Return size (cardinality) of domain.
int PropCond
Type for propagation conditions.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
int min(void) const
Return minimum of domain.
Cardinality integer view.
IntView base(void) const
Return used IntView (cannot be used)
void update(Space &home, bool share, VarImpView< Var > &y)
Update this view to be a clone of view y.
void init(Space &home, int min, int max, int c)
Initialize with min, max, and cardinality c.
int max(void) const
Return maximum of domain.
int card(void) const
Return cardinality.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
void init(const IntView &y, int c)
Initialize with integer view y and value c.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Integer view for integer variables.
ModEvent inc(void)
Increment counter.
int max(void) const
Return maximum of domain.
Node * x
Pointer to corresponding Boolean expression node.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
void update(Space &home, bool share, CardConst &x)
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
int counter(void) const
Return the number of times the value occurs.
void subscribe(Space &home, Propagator &p, PropCond pc, bool process=true)
Cancel subscription of propagator p with propagation condition pc to view.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
const ModEvent ME_GEN_NONE
Generic modification event: no modification.
IntView x
View from which this view is derived.
int min(void) const
Return minimum of domain.
int counter(void) const
Return the number of times the value occurs.
Gecode toplevel namespace
ModEvent inc(void)
Increment counter.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
#define GECODE_NEVER
Assert that this command is never executed.
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.