42 #ifndef __GECODE_INT_BIN_PACKING_HH__ 43 #define __GECODE_INT_BIN_PACKING_HH__ 107 int card(
void)
const;
109 int total(
void)
const;
127 int card(
void)
const;
129 int total(
void)
const;
163 template<
class SizeSet>
166 template<
class SizeSet>
195 int nodes(
void)
const;
211 bool in(
int i)
const;
283 void incl(
int i,
unsigned int w);
285 void excl(
int i,
unsigned int w);
315 void edge(
int i,
int j,
bool add=
true);
int * s
Array of sizes (will have more elements)
int operator [](int i) const
Return size of item i.
bool adjacent(int i, int j) const
Test whether nodes i and j are adjacent.
void excl(int i)
Exclude node i.
void empty(int n)
Clear the whole node set for n nodes.
bool in(int i) const
Test whether node i is included.
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.
Node * node
The nodes in the graph.
int t
Total size of all items.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
int operator [](int i) const
Return size of item i.
int card(void) const
Return cardinality of set (number of entries)
unsigned int c
Cardinality of clique.
Basic bitset support (without stored size information)
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.
ConflictGraph(Home &home, Region &r, const IntVarArgs &b, int m)
Initialize graph.
int pivot(const NodeSet &a, const NodeSet &b) const
Find a pivot node with maximal degree from a or b.
int size(void) const
Return size of item.
Node(void)
Default constructor.
void copy(int n, const NodeSet &ns)
Copy elements from node set ns with n nodes.
static ExecStatus post(Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs)
Post propagator for loads l and items bs.
Base-class for derived views.
ExecStatus clique(void)
Report the current clique.
Base-class for both propagators and branchers.
ExecStatus post(void)
Post additional constraints.
Graph containing conflict information.
void update(Space &home, bool share, Item &i)
Update item during cloning.
SizeSet(void)
Default constructor.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Gecode::FloatVal c(-8, 8)
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.
~ConflictGraph(void)
Destructor.
ModEventDelta med
A set of modification events (used during propagation)
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)
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Nodes(const NodeSet &ns)
Initialize for nodes in ns.
Clique cur
Current clique.
Clique(Region &r, int m)
Constructor for m nodes.
void init(Region &r, int n)
Initialize node set for n nodes.
unsigned int w
Weight (initialized with degree before graph is reduced)
void edge(int i, int j, bool add=true)
Add or remove an edge between nodes i and j (i must be less than j)
void add(int s)
Add new size s.
ExecStatus bk(NodeSet &p, NodeSet &x)
Run Bosch-Kerbron algorithm for finding max cliques.
void operator++(void)
Move iterator to next node (if possible)
Passing integer variables.
void incl(int i)
Include node i.
Item(void)
Default constructor.
int operator()(void) const
Return current node.
Post propagator for SetVar SetOpType SetVar SetRelType r
bool before(const Item &i, const Item &j)
Test whether one item is before another.
IntSet maxclique(void) const
Return maximal clique found.
Integer view for integer variables.
virtual size_t dispose(Space &home)
Destructor.
IntView bin(void) const
Return bin of item.
bool same(const Item &i, const Item &j)
Whether two items are the same.
Clique max
Largest clique so far.
Size sets with one element discarded.
int t
Total size of the set.
int nodes(void) const
Return number of nodes.
unsigned int w
Weight of clique.
Post propagator for SetVar x
NodeSet n
Nodes in the clique.
void allocate(Region &r, int n)
Allocate node set for n nodes.
const IntVarArgs & b
Bin variables.
void minus(int s)
Discard size s.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Gecode toplevel namespace
unsigned int bins
Number of bins.
NodeSet(void)
Keep uninitialized.
int total(void) const
Return total size.
#define GECODE_INT_EXPORT
int ModEventDelta
Modification event deltas.
Home class for posting propagators
virtual void reschedule(Space &home)
Schedule function.
void incl(int i, unsigned int w)
Include node i with weight w.
void excl(int i, unsigned int w)
Exclude node i with weight w.
static bool iwn(NodeSet &iwa, const NodeSet &a, NodeSet &iwb, const NodeSet &b, const NodeSet &c, int n)