Generated on Wed Sep 5 2012 18:52:41 for Gecode by doxygen 1.8.1.1
Gecode::Int::Sequence::Violations Class Reference

Simple bitsets for recording violations. More...

#include <violations.hpp>

List of all members.

Public Member Functions

 Violations (void)
 Default constructor.
void init (Space &home, unsigned int n)
 Initialize violation set for n violations.
void update (Space &home, bool shared, Violations &v)
 Update violation set during cloning.
bool empty (void) const
 Return whether set is empty.
void add (unsigned int i)
 Add i to violation set.
unsigned int get (void)
 Get first element from violation set and remove it.
- Public Member Functions inherited from Gecode::Support::BitSetBase
 BitSetBase (void)
 Default constructor (yields empty set)
template<class A >
 BitSetBase (A &a, unsigned int s, bool set=false)
 Initialize for s bits and allocator a.
template<class A >
 BitSetBase (A &a, const BitSetBase &bs)
 Copy from bitset bs with allocator a.
template<class A >
void init (A &a, unsigned int s, bool set=false)
 Initialize for s bits and allocator a (only after default constructor)
unsigned int size (void) const
 Return size of bitset (number of bits)
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 (void) const
 Return status of bitset.
template<class A >
void resize (A &a, unsigned int n, bool set=false)
 Resize bitset to n elememts.
template<class A >
void dispose (A &a)
 Dispose memory for bit set.

Protected Attributes

unsigned int fst
 The (possibly) first set bit (set is empty if fst == sz)
- Protected Attributes inherited from Gecode::Support::BitSetBase
unsigned int sz
 Size of bitset (number of bits)
BitSetDatadata
 Stored bits.

Additional Inherited Members

- Protected Member Functions inherited from Gecode::Support::BitSetBase
bool _get (unsigned int i) const
 Access value at bit i (no index check)
void _set (unsigned int i)
 Set bit i (no index check)
- Static Protected Attributes inherited from Gecode::Support::BitSetBase
static const unsigned int bpb = BitSetData::bpb
 Bits per base.

Detailed Description

Simple bitsets for recording violations.

Definition at line 44 of file violations.hpp.


Constructor & Destructor Documentation

Gecode::Int::Sequence::Violations::Violations ( void  )
inline

Default constructor.

Definition at line 65 of file violations.hpp.


Member Function Documentation

void Gecode::Int::Sequence::Violations::init ( Space home,
unsigned int  n 
)
inline

Initialize violation set for n violations.

Definition at line 68 of file violations.hpp.

void Gecode::Int::Sequence::Violations::update ( Space home,
bool  shared,
Violations v 
)
inline

Update violation set during cloning.

Definition at line 80 of file violations.hpp.

bool Gecode::Int::Sequence::Violations::empty ( void  ) const
inline

Return whether set is empty.

Definition at line 74 of file violations.hpp.

void Gecode::Int::Sequence::Violations::add ( unsigned int  i)
inline

Add i to violation set.

Definition at line 86 of file violations.hpp.

unsigned int Gecode::Int::Sequence::Violations::get ( void  )
inline

Get first element from violation set and remove it.

Definition at line 91 of file violations.hpp.


Member Data Documentation

unsigned int Gecode::Int::Sequence::Violations::fst
mutableprotected

The (possibly) first set bit (set is empty if fst == sz)

Definition at line 47 of file violations.hpp.


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