Gecode::Support::RawBitSetBase Class Reference

Basic bitset support (without stored size information). More...

`#include <bitset-base.hpp>`

## Public Member Functions

| 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

BitSetData * | data
| Stored bits.

## Static Protected Attributes

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

## Detailed Description

Basic bitset support (without stored size information).

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

## Constructor & Destructor Documentation

## RawBitSetBase() [1/3]

Gecode::Support::RawBitSetBase::RawBitSetBase | ( | void |  | ) |

inline

Default constructor (yields empty set).

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

## RawBitSetBase() [2/3]

template<class A>

Gecode::Support::RawBitSetBase::RawBitSetBase | ( | A & | a,
|  | unsigned int | sz,
|  | bool | setbits = false )

inline

Initialize for sz bits and allocator a.

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

## RawBitSetBase() [3/3]

template<class A>

Gecode::Support::RawBitSetBase::RawBitSetBase | ( | A & | a,
|  | unsigned int | sz,
|  | const RawBitSetBase & | bs )

inline

Copy from bitset bs with allocator a.

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

## Member Function Documentation

## allocate()

template<class A>

void Gecode::Support::RawBitSetBase::allocate | ( | A & | a,
|  | unsigned int | sz )

inline

Allocate for sz bits and allocator a (only after default constructor).

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

## init()

template<class A>

void Gecode::Support::RawBitSetBase::init | ( | A & | a,
|  | unsigned int | sz,
|  | bool | setbits = false )

inline

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

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

## clearall()

void Gecode::Support::RawBitSetBase::clearall | ( | unsigned int | sz,
|  | bool | setbits = false )

inline

Clear sz bits.

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

## copy()

void Gecode::Support::RawBitSetBase::copy | ( | unsigned int | sz,
|  | const RawBitSetBase & | bs )

inline

Copy sz bits from bs.

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

## get()

bool Gecode::Support::RawBitSetBase::get | ( | unsigned int | i | ) | const

inline

Access value at bit i.

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

## set()

void Gecode::Support::RawBitSetBase::set | ( | unsigned int | i | ) |

inline

Set bit i.

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

## clear()

void Gecode::Support::RawBitSetBase::clear | ( | unsigned int | i | ) |

inline

Clear bit i.

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

## next()

unsigned int Gecode::Support::RawBitSetBase::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 491 of file bitset-base.hpp.

## status()

BitSetStatus Gecode::Support::RawBitSetBase::status | ( | unsigned int | sz | ) | const

inline

Return status of bitset.

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

## all()

bool Gecode::Support::RawBitSetBase::all | ( | unsigned int | sz | ) | const

inline

Test whether all bits are set.

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

## none()

bool Gecode::Support::RawBitSetBase::none | ( | unsigned int | sz | ) | const

inline

Test whether no bits are set.

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

## resize()

template<class A>

void Gecode::Support::RawBitSetBase::resize | ( | A & | a,
|  | unsigned int | sz,
|  | unsigned int | n,
|  | bool | setbits = false )

Resize bitset from sz to n elememts.

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

## dispose()

template<class A>

void Gecode::Support::RawBitSetBase::dispose | ( | A & | a,
|  | unsigned int | sz )

inline

Dispose memory for bit set.

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

## Member Data Documentation

## bpb

const unsigned int Gecode::Support::RawBitSetBase::bpb = BitSetData::bpb

static protected

Bits per base.

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

## data

BitSetData* Gecode::Support::RawBitSetBase::data

protected

Stored bits.

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

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

- gecode/support/bitset-base.hpp