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)
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);
Node * x
Pointer to corresponding Boolean expression node.
static const int MAX_OF_EMPTY
Returned by empty sets when asked for their maximum element.
static const int MIN_OF_EMPTY
Returned by empty sets when asked for their minimum element.
Range iterator for least upper bound of set variable views
Array with arbitrary number of elements.
@ ES_NOFIX
Propagation has not computed fixpoint.
const FloatNum max
Largest allowed float value.
const FloatNum min
Smallest allowed float value.
bool assigned(View x, int v)
Whether x is assigned to value v.
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
const int min
Smallest allowed integer in integer set.
const int max
Largest allowed integer in integer set.
ExecStatus propagateSeq(Space &home, bool &modified, bool &assigned, ViewArray< SetView > &x)
Gecode::IntArgs i({1, 2, 3, 4})
#define GECODE_SET_ME_CHECK_VAL_B(modified, tell, f)