38 #ifndef __GECODE_INT_BIN_PACKING_HH__
39 #define __GECODE_INT_BIN_PACKING_HH__
48 namespace Gecode {
namespace Int {
namespace BinPacking {
103 int card(
void)
const;
105 int total(
void)
const;
123 int card(
void)
const;
125 int total(
void)
const;
159 template<
class SizeSet>
162 template<
class SizeSet>
int * s
Array of sizes (will have more elements)
int card(void) const
Return cardinality of set (number of entries)
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.
IntView bin(void) const
Return bin of item.
Item combining bin and size information.
int size(void) const
Return size of item.
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)
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.
static ExecStatus post(Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs)
Post propagator for loads l and items bs.
Base-class for derived views.
Base-class for both propagators and branchers.
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)
ModEventDelta med
A set of modification events (used during propagation)
bool operator<(const Item &i, const Item &j)
For sorting according to size.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
int operator[](int i) const
Return size of item i.
struct Gecode::@512::NNF::@54::@55 b
For binary nodes (and, or, eqv)
void add(int s)
Add new size s.
Item(void)
Default constructor.
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.
bool same(const Item &i, const Item &j)
Whether two items are the same.
Size sets with one element discarded.
int t
Total size of the set.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
void minus(int s)
Discard size s.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
struct Gecode::@512::NNF::@54::@56 a
For atomic nodes.
#define GECODE_INT_EXPORT
int ModEventDelta
Modification event deltas.
Home class for posting propagators
int total(void) const
Return total size.
int total(void) const
Return total size.