40 namespace Gecode {
namespace Int {
namespace GCC {
50 int m = l + (r -
l) / 2;
51 if (v == a[m].
card()) {
55 }
else if (v < a[m].
card()) {
167 unsigned int size(
void)
const;
171 int card(
void)
const;
218 _min =
min; _max=
max; _card =
c; _counter = 0;
249 if (++_counter > _max)
267 if ((_min > n) || (_max < n))
281 _min=x._min; _max=x._max; _card=x._card; _counter=x._counter;
300 x =
y; _card =
c; _counter = 0;
304 x =
IntVar(home,s); _card =
c; _counter = 0;
334 if (++_counter > this->
max())
354 return x.narrow_v(home,i,depends);
359 return x.inter_v(home,i,depends);
364 return x.minus_v(home,i,depends);
int max(void) const
Return maximum of domain.
View base(void) const
Return view from which this view is derived.
CardView(void)
Default constructor.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
IntView base(void) const
Return used IntView (cannot be used)
Constant view containing lower and upper cardinality bounds.
bool lookupValue(T &a, int v, int &i)
Return index of v in array a.
ViewRanges(void)
Default constructor.
int card(void) const
Return cardinality.
int ModEvent
Type for modification events.
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
Base-class for propagators.
unsigned int size(void) const
Return size (cardinality) of domain.
Range iterator for integer variable views
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.
Range iterator for integer views.
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 n
Number of negative literals for node type.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
static const bool propagate
This view does not require propagation.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int PropCond
Type for propagation conditions.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int card(void) const
Return cardinality.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
unsigned int size(I &i)
Size of all ranges of range iterator i.
void update(Space &home, VarImpVar< VarImp > &y)
Update this variable to be a clone of variable y.
int min(void) const
Return minimum of domain.
Cardinality integer view.
void init(Space &home, int min, int max, int c)
Initialize with min, max, and cardinality c.
void update(Space &home, CardView &x)
void init(const IntView &y, int c)
Initialize with integer view y and value c.
Post propagator for SetVar SetOpType SetVar SetRelType r
Integer view for integer variables.
ModEvent inc(void)
Increment counter.
Post propagator for SetVar SetOpType SetVar y
const double base
Base for geometric restart sequence.
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
void subscribe(Space &home, Propagator &p, PropCond pc, bool process=true)
Cancel subscription of propagator p with propagation condition pc to view.
const ModEvent ME_GEN_NONE
Generic modification event: no modification.
Post propagator for SetVar x
View x
View from which this view is derived.
int counter(void) const
Return the number of times the value occurs.
int max(void) const
Return maximum of domain.
Gecode toplevel namespace
void update(Space &home, CardConst &x)
bool assigned(void) const
int min(void) const
Return minimum of domain.
ModEvent inc(void)
Increment counter.
int counter(void) const
Return the number of times the value occurs.
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.