Generated on Thu Mar 22 10:40:00 2012 for Gecode by doxygen 1.6.3

Gecode::Support::BitSetBase Class Reference

Basic bitset support. More...

#include <bitset-base.hpp>

List of all members.

Public Member Functions

 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 Member Functions

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).

Protected Attributes

unsigned int sz
 Size of bitset (number of bits).
BitSetDatadata
 Stored bits.

Static Protected Attributes

static const unsigned int bpb = BitSetData::bpb
 Bits per base.

Detailed Description

Basic bitset support.

Definition at line 113 of file bitset-base.hpp.


Constructor & Destructor Documentation

Gecode::Support::BitSetBase::BitSetBase ( void   )  [inline]

Default constructor (yields empty set).

Definition at line 272 of file bitset-base.hpp.

template<class A >
Gecode::Support::BitSetBase::BitSetBase ( A &  a,
unsigned int  s,
bool  set = false 
) [inline]

Initialize for s bits and allocator a.

Definition at line 277 of file bitset-base.hpp.

template<class A >
Gecode::Support::BitSetBase::BitSetBase ( A &  a,
const BitSetBase bs 
) [inline]

Copy from bitset bs with allocator a.

Definition at line 288 of file bitset-base.hpp.


Member Function Documentation

bool Gecode::Support::BitSetBase::_get ( unsigned int  i  )  const [inline, protected]

Access value at bit i (no index check).

Definition at line 238 of file bitset-base.hpp.

void Gecode::Support::BitSetBase::_set ( unsigned int  i  )  [inline, protected]

Set bit i (no index check).

Definition at line 242 of file bitset-base.hpp.

template<class A >
void Gecode::Support::BitSetBase::init ( A &  a,
unsigned int  s,
bool  set = false 
) [inline]

Initialize for s bits and allocator a (only after default constructor).

Definition at line 299 of file bitset-base.hpp.

unsigned int Gecode::Support::BitSetBase::size ( void   )  const [inline]

Return size of bitset (number of bits).

Definition at line 309 of file bitset-base.hpp.

bool Gecode::Support::BitSetBase::get ( unsigned int  i  )  const [inline]

Access value at bit i.

Definition at line 314 of file bitset-base.hpp.

void Gecode::Support::BitSetBase::set ( unsigned int  i  )  [inline]

Set bit i.

Definition at line 319 of file bitset-base.hpp.

void Gecode::Support::BitSetBase::clear ( unsigned int  i  )  [inline]

Clear bit i.

Definition at line 324 of file bitset-base.hpp.

unsigned int Gecode::Support::BitSetBase::next ( unsigned int  i  )  const [inline]

Return position greater or equal i of next set bit (i is allowed to be equal to size).

Definition at line 330 of file bitset-base.hpp.

BitSetStatus Gecode::Support::BitSetBase::status ( void   )  const [inline]

Return status of bitset.

Definition at line 344 of file bitset-base.hpp.

template<class A >
void Gecode::Support::BitSetBase::resize ( A &  a,
unsigned int  n,
bool  set = false 
) [inline]

Resize bitset to n elememts.

Definition at line 248 of file bitset-base.hpp.

template<class A >
void Gecode::Support::BitSetBase::dispose ( A &  a  )  [inline]

Dispose memory for bit set.

Definition at line 267 of file bitset-base.hpp.


Member Data Documentation

const unsigned int Gecode::Support::BitSetBase::bpb = BitSetData::bpb [static, protected]

Bits per base.

Definition at line 116 of file bitset-base.hpp.

unsigned int Gecode::Support::BitSetBase::sz [protected]

Size of bitset (number of bits).

Definition at line 118 of file bitset-base.hpp.

Stored bits.

Definition at line 120 of file bitset-base.hpp.


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