Gecode::Int::Sequence::Violations Class Reference

Simple bitsets for recording violations. More...

`#include <violations.hpp>`

## Public Member Functions

| Violations (void)
| Default constructor.
void | init (Space &home, unsigned int n)
| Initialize violation set for n violations.
void | update (Space &home, 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 setbits=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 setbits=false)
| Initialize for s bits and allocator a (only after default constructor).
void | clearall (bool setbits=false)
| Clear sz bits.
void | copy (const BitSetBase &bs)
| Copy sz bits from bs.
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.
bool | all (void) const
| Test whether all bits are set.
bool | none (void) const
| Test whether no bits are set.
template<class A>
void | resize (A &a, unsigned int n, bool setbits=false)
| Resize bitset to n elememts.
template<class A>
void | dispose (A &a)
| Dispose memory for bit set.
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.

## 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).
Protected Attributes inherited from Gecode::Support::RawBitSetBase
BitSetData * | data
| Stored bits.

## Additional Inherited Members

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

## Detailed Description

Simple bitsets for recording violations.

Definition at line 40 of file violations.hpp.

## Constructor & Destructor Documentation

## Violations()

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

inline

Default constructor.

Definition at line 61 of file violations.hpp.

## Member Function Documentation

## init()

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

inline

Initialize violation set for n violations.

Definition at line 64 of file violations.hpp.

## update()

void Gecode::Int::Sequence::Violations::update | ( | Space & | home,
|  | Violations & | v )

inline

Update violation set during cloning.

Definition at line 76 of file violations.hpp.

## empty()

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

inline

Return whether set is empty.

Definition at line 70 of file violations.hpp.

## add()

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

inline

Add i to violation set.

Definition at line 82 of file violations.hpp.

## get()

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

inline

Get first element from violation set and remove it.

Definition at line 87 of file violations.hpp.

## Member Data Documentation

## fst

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

mutable protected

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

Definition at line 43 of file violations.hpp.

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

- gecode/int/sequence/violations.hpp