40 namespace Gecode {
namespace Set {
namespace Sequence {
45 int lastElem = x.
size()-1;
52 for (
int i=0;
i<lastElem;
i++) {
53 if (x[
i].glbSize() > 0)
54 cur_max =
std::max(cur_max, x[
i].glbMax());
55 if (x[
i].cardMin() > 0)
56 cur_max =
std::max(cur_max, x[
i].lubMinN(x[
i].cardMin()-1));
63 if (x[lastElem-
i].lubSize() > 0) {
64 cur_min =
std::min(cur_min, x[lastElem-
i].glbMin());
65 if (x[lastElem-
i].cardMin() > 0) {
71 ub[2*j]=ubr.min(); ub[2*j+1]=ubr.max();
73 unsigned int xcm = x[lastElem-
i].cardMin()-1;
75 unsigned int width =
static_cast<unsigned int>(ub[2*j+1]-ub[2*j]+1);
77 maxN =
static_cast<int>(ub[2*j+1]-xcm);
87 x[lastElem-
i-1].
exclude(home, cur_min,
const int min
Smallest allowed integer in integer set.
const FloatNum max
Largest allowed float value.
Array with arbitrary number of elements.
static const int MIN_OF_EMPTY
Returned by empty sets when asked for their minimum element.
const int max
Largest allowed integer in integer set.
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
static const int MAX_OF_EMPTY
Returned by empty sets when asked for their maximum element.
const FloatNum min
Smallest allowed float value.
Range iterator for least upper bound of set variable views
Gecode::IntArgs i({1, 2, 3, 4})
#define GECODE_SET_ME_CHECK_VAL_B(modified, tell, f)
Post propagator for SetVar SetOpType SetVar SetRelType r
bool assigned(View x, int v)
Whether x is assigned to value v.
ExecStatus propagateSeq(Space &home, bool &modified, bool &assigned, ViewArray< SetView > &x)
Post propagator for SetVar x
Propagation has not computed fixpoint.
Gecode toplevel namespace
int size(void) const
Return size of array (number of elements)