Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
Gecode::Int::BinPacking::ConflictGraph::NodeSet Class Reference

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.
Public Member Functions inherited from Gecode::Support::RawBitSetBase
 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

Protected Attributes inherited from Gecode::Support::RawBitSetBase
BitSetDatadata
 Stored bits.
Static Protected Attributes inherited from Gecode::Support::RawBitSetBase
static const unsigned int bpb = BitSetData::bpb
 Bits per base.

Detailed Description

Sets of graph nodes.

Definition at line 194 of file bin-packing.hh.

Constructor & Destructor Documentation

◆ NodeSet() [1/3]

Gecode::Int::BinPacking::ConflictGraph::NodeSet::NodeSet ( void )
inline

Keep uninitialized.

Definition at line 47 of file conflict-graph.hpp.

◆ NodeSet() [2/3]

Gecode::Int::BinPacking::ConflictGraph::NodeSet::NodeSet ( Region & r,
int n )
inline

Initialize node set for n nodes.

Definition at line 49 of file conflict-graph.hpp.

◆ NodeSet() [3/3]

Gecode::Int::BinPacking::ConflictGraph::NodeSet::NodeSet ( Region & r,
int n,
const NodeSet & ns )
inline

Initialize node set as copy of ns with n nodes.

Definition at line 52 of file conflict-graph.hpp.

Member Function Documentation

◆ allocate()

void Gecode::Int::BinPacking::ConflictGraph::NodeSet::allocate ( Region & r,
int n )
inline

Allocate node set for n nodes.

Definition at line 56 of file conflict-graph.hpp.

◆ init()

void Gecode::Int::BinPacking::ConflictGraph::NodeSet::init ( Region & r,
int n )
inline

Initialize node set for n nodes.

Definition at line 60 of file conflict-graph.hpp.

◆ in()

bool Gecode::Int::BinPacking::ConflictGraph::NodeSet::in ( int i) const
inline

Test whether node i is included.

Definition at line 64 of file conflict-graph.hpp.

◆ incl()

void Gecode::Int::BinPacking::ConflictGraph::NodeSet::incl ( int i)
inline

Include node i.

Definition at line 68 of file conflict-graph.hpp.

◆ excl()

void Gecode::Int::BinPacking::ConflictGraph::NodeSet::excl ( int i)
inline

Exclude node i.

Definition at line 72 of file conflict-graph.hpp.

◆ copy()

void Gecode::Int::BinPacking::ConflictGraph::NodeSet::copy ( int n,
const NodeSet & ns )
inline

Copy elements from node set ns with n nodes.

Definition at line 76 of file conflict-graph.hpp.

◆ empty()

void Gecode::Int::BinPacking::ConflictGraph::NodeSet::empty ( int n)
inline

Clear the whole node set for n nodes.

Definition at line 80 of file conflict-graph.hpp.

◆ iwn()

bool Gecode::Int::BinPacking::ConflictGraph::NodeSet::iwn ( NodeSet & iwa,
const NodeSet & a,
NodeSet & iwb,
const NodeSet & b,
const NodeSet & c,
int n )
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.


The documentation for this class was generated from the following files: