Sets of graph nodes. More...
#include <bin-packing.hh>
Public Member Functions | |
NodeSet (void) | |
Keep uninitialized. | |
NodeSet (Region &r, int n) | |
Initialize node set for n nodes. | |
NodeSet (Region &r, int n, const NodeSet &ns) | |
Initialize node set as copy of ns with n nodes. | |
void | allocate (Region &r, int n) |
Allocate node set for n nodes. | |
void | init (Region &r, int n) |
Initialize node set for n nodes. | |
bool | in (int i) const |
Test whether node i is included. | |
void | incl (int i) |
Include node i. | |
void | excl (int i) |
Exclude node i. | |
void | copy (int n, const NodeSet &ns) |
Copy elements from node set ns with n nodes. | |
void | empty (int n) |
Clear the whole node set for n nodes. | |
![]() | |
RawBitSetBase (void) | |
Default constructor (yields empty set) | |
template<class A > | |
RawBitSetBase (A &a, unsigned int sz, bool setbits=false) | |
Initialize for sz bits and allocator a. | |
template<class A > | |
RawBitSetBase (A &a, unsigned int sz, const RawBitSetBase &bs) | |
Copy from bitset bs with allocator a. | |
template<class A > | |
void | allocate (A &a, unsigned int sz) |
Allocate for sz bits and allocator a (only after default constructor) | |
template<class A > | |
void | init (A &a, unsigned int sz, bool setbits=false) |
Initialize for sz bits and allocator a (only after default constructor) | |
void | clearall (unsigned int sz, bool setbits=false) |
Clear sz bits. | |
void | copy (unsigned int sz, const RawBitSetBase &bs) |
Copy sz bits from bs. | |
bool | get (unsigned int i) const |
Access value at bit i. | |
void | set (unsigned int i) |
Set bit i. | |
void | clear (unsigned int i) |
Clear bit i. | |
unsigned int | next (unsigned int i) const |
Return position greater or equal i of next set bit (i is allowed to be equal to size) | |
BitSetStatus | status (unsigned int sz) const |
Return status of bitset. | |
bool | all (unsigned int sz) const |
Test whether all bits are set. | |
bool | none (unsigned int sz) const |
Test whether no bits are set. | |
template<class A > | |
void | resize (A &a, unsigned int sz, unsigned int n, bool setbits=false) |
Resize bitset from sz to n elememts. | |
template<class A > | |
void | dispose (A &a, unsigned int sz) |
Dispose memory for bit set. | |
Static Public Member Functions | |
static bool | iwn (NodeSet &iwa, const NodeSet &a, NodeSet &iwb, const NodeSet &b, const NodeSet &c, int n) |
Additional Inherited Members | |
![]() | |
BitSetData * | data |
Stored bits. | |
![]() | |
static const unsigned int | bpb = BitSetData::bpb |
Bits per base. | |
Sets of graph nodes.
Definition at line 194 of file bin-packing.hh.
|
inline |
Keep uninitialized.
Definition at line 47 of file conflict-graph.hpp.
|
inline |
Initialize node set for n nodes.
Definition at line 49 of file conflict-graph.hpp.
|
inline |
Initialize node set as copy of ns with n nodes.
Definition at line 52 of file conflict-graph.hpp.
|
inline |
Allocate node set for n nodes.
Definition at line 56 of file conflict-graph.hpp.
|
inline |
Initialize node set for n nodes.
Definition at line 60 of file conflict-graph.hpp.
|
inline |
Test whether node i is included.
Definition at line 64 of file conflict-graph.hpp.
|
inline |
Include node i.
Definition at line 68 of file conflict-graph.hpp.
|
inline |
Exclude node i.
Definition at line 72 of file conflict-graph.hpp.
|
inline |
Copy elements from node set ns with n nodes.
Definition at line 76 of file conflict-graph.hpp.
|
inline |
Clear the whole node set for n nodes.
Definition at line 80 of file conflict-graph.hpp.
|
inlinestatic |
Initialize ac as intersection of a and c, bc as intersection of b and c where n is the maximal number of nodes. Return whether both \ac and bc are empty.
Definition at line 84 of file conflict-graph.hpp.