Gecode::Int::NValues::SymBitMatrix Class Reference

Symmetric diagonal bit matrix. More...

`#include <nvalues.hh>`

## Public Member Functions

| SymBitMatrix (Region &r, int n)
| Initialize matrix for dimension n by n.
bool | get (int x, int y) const
| Is bit at position x, y set?
void | set (int x, int y)
| Set bit at position x, y.
Public Member Functions inherited from Gecode::Support::BitSet< Region >
| BitSet (Region &a, unsigned int s, bool set=false)
| Bit set with space for s bits.
| BitSet (Region &a, const BitSet &bs)
| Copy bit set bs.
| ~BitSet (void)
| Destructor.
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 Member Functions

int | pos (int x, int y) const
| Return position in matrix.

## Protected Attributes

int | n
| Size of matrix.
Protected Attributes inherited from Gecode::Support::BitSet< Region >
Region & | a
| Allocator.
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

Symmetric diagonal bit matrix.

Definition at line 71 of file nvalues.hh.

## Constructor & Destructor Documentation

## SymBitMatrix()

Gecode::Int::NValues::SymBitMatrix::SymBitMatrix | ( | Region & | r,
|  | int | n )

inline

Initialize matrix for dimension n by n.

Definition at line 45 of file sym-bit-matrix.hpp.

## Member Function Documentation

## pos()

int Gecode::Int::NValues::SymBitMatrix::pos | ( | int | x,
|  | int | y ) const

inline protected

Return position in matrix.

Definition at line 39 of file sym-bit-matrix.hpp.

## get()

bool Gecode::Int::NValues::SymBitMatrix::get | ( | int | x,
|  | int | y ) const

inline

Is bit at position x, y set?

Definition at line 50 of file sym-bit-matrix.hpp.

## set()

void Gecode::Int::NValues::SymBitMatrix::set | ( | int | x,
|  | int | y )

inline

Set bit at position x, y.

Definition at line 57 of file sym-bit-matrix.hpp.

## Member Data Documentation

## n

int Gecode::Int::NValues::SymBitMatrix::n

protected

Size of matrix.

Definition at line 74 of file nvalues.hh.

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

- gecode/int/nvalues.hh
- gecode/int/nvalues/sym-bit-matrix.hpp