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>
192 int nodes(
void)
const;
208 bool in(
int i)
const;
280 void incl(
int i,
unsigned int w);
282 void excl(
int i,
unsigned int w);
312 void edge(
int i,
int j,
bool add=
true);
int * s
Array of sizes (will have more elements)
int card(void) const
Return cardinality of set (number of entries)
void excl(int i)
Exclude node i.
void empty(int n)
Clear the whole node set for n nodes.
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 nodes(void) const
Return number of nodes.
int size(void) const
Return size of item.
ViewArray< Item > bs
Items with bin and size.
Node * node
The nodes in the graph.
int t
Total size of all items.
unsigned int c
Cardinality of clique.
int operator[](int i) const
Return size of item i.
int card(void) const
Return cardinality of set (number of entries)
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(Space &home, Region &r, const IntVarArgs &b, int m)
Initialize graph.
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.
IntSet maxclique(void) const
Return maximal clique found.
void update(Space &home, bool share, Item &i)
Update item during cloning.
SizeSet(void)
Default constructor.
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)
bool operator<(const Item &i, const Item &j)
For sorting according to size.
bool adjacent(int i, int j) const
Test whether nodes i and j are adjacent.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Nodes(const NodeSet &ns)
Initialize for nodes in ns.
Clique cur
Current clique.
int operator[](int i) const
Return size of item i.
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)
bool in(int i) const
Test whether node i is included.
Passing integer variables.
void incl(int i)
Include node i.
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.
Node * x
Pointer to corresponding Boolean expression node.
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.
unsigned int w
Weight of clique.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
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.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
int operator()(void) const
Return current node.
unsigned int bins
Number of bins.
NodeSet(void)
Keep uninitialized.
int pivot(const NodeSet &a, const NodeSet &b) const
Find a pivot node with maximal degree from a or b.
#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.
void incl(int i, unsigned int w)
Include node i with weight w.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
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)