44 namespace Gecode {
namespace Set {
namespace Sequence {
49 int lastElem = x.
size()-1;
56 for (
int i=0;
i<lastElem;
i++) {
57 if (x[
i].glbSize() > 0)
58 cur_max =
std::max(cur_max, x[
i].glbMax());
59 if (x[
i].cardMin() > 0)
60 cur_max =
std::max(cur_max, x[
i].lubMinN(x[
i].cardMin()-1));
67 if (x[lastElem-
i].lubSize() > 0) {
68 cur_min =
std::min(cur_min, x[lastElem-
i].glbMin());
69 if (x[lastElem-
i].cardMin() > 0) {
75 ub[2*j]=ubr.min(); ub[2*j+1]=ubr.max();
77 unsigned int xcm = x[lastElem-
i].cardMin()-1;
79 unsigned int width =
static_cast<unsigned int>(ub[2*j+1]-ub[2*j]+1);
81 maxN =
static_cast<int>(ub[2*j+1]-xcm);
91 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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Range iterator for least upper bound of set variable views
#define GECODE_SET_ME_CHECK_VAL_B(modified, tell, f)
Node * x
Pointer to corresponding Boolean expression node.
bool assigned(View x, int v)
Whether x is assigned to value v.
ExecStatus propagateSeq(Space &home, bool &modified, bool &assigned, ViewArray< SetView > &x)
Propagation has not computed fixpoint.
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace