100 :
n(0),
t(0), s(region.alloc<int>(n_max)) {}
103 t += s0;
s[
n++] = s0;
144 return s[(
i <
p) ?
i :
i+1];
159 for (
int i=
bs.size();
i--; )
175 return sizeof(*this);
178 template<
class SizeSet>
181 if ((
a <= 0) || (
b >= s.
total()))
186 while (sc + s[
n-kp] <
a) {
191 int sa=0, sb = s[
n-kp];
192 while ((sa <
a) && (sb <=
b)) {
198 while (sa + sc >=
a) {
201 sb += s[
n-kp] - s[
n-kp-k-1];
205 ap = sa + sc; bp = sb;
209 template<
class SizeSet>
int * s
Array of sizes (will have more elements)
int operator [](int i) const
Return size of item i.
int size(void) const
Return size of array (number of elements)
int p
Position of discarded item.
SizeSetMinusOne(void)
Default constructor.
bool nosum(const SizeSet &s, int a, int b, int &ap, int &bp)
Detect non-existence of sums in a .. b.
Item combining bin and size information.
ViewArray< Item > bs
Items with bin and size.
int t
Total size of all items.
int operator [](int i) const
Return size of item i.
int card(void) const
Return cardinality of set (number of entries)
struct Gecode::@511::NNF::@54::@55 b
For binary nodes (and, or, eqv)
Base-class for propagators.
int n
Number of size entries in the set.
Pack(Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs)
Constructor for posting.
ViewArray< OffsetView > l
Views for load of bins.
int size(void) const
Return size of item.
Base-class for derived views.
void update(Space &home, bool share, Item &i)
Update item during cloning.
SizeSet(void)
Default constructor.
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.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
int total(void) const
Return total size.
bool operator<(const Item &i, const Item &j)
For sorting according to size.
int card(void) const
Return cardinality of set (number of entries)
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
size_t size
The size of the propagator (used during subsumption)
void add(int s)
Add new size s.
void update(Space &home, bool share, VarImpView< Var > &y)
Update this view to be a clone of view y.
Item(void)
Default constructor.
struct Gecode::@511::NNF::@54::@56 a
For atomic nodes.
bool before(const Item &i, const Item &j)
Test whether one item is before another.
Integer view for integer variables.
virtual size_t dispose(Space &home)
Destructor.
virtual size_t dispose(Space &home)
Delete actor and return its size.
IntView bin(void) const
Return bin of item.
bool same(const Item &i, const Item &j)
Whether two items are the same.
int t
Total size of the set.
void minus(int s)
Discard size s.
IntView x
View from which this view is derived.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Gecode toplevel namespace
int total(void) const
Return total size.
Home class for posting propagators