Generated on Tue Apr 18 10:24:13 2017 for Gecode by doxygen 1.6.3

Gecode::Support::BitSetOffset< A > Class Template Reference

Bitsets with index offset. More...

#include <bitset-offset.hpp>

List of all members.

Public Member Functions

 BitSetOffset (A &a, unsigned int s, int o)
 Bit set with space for s bits with offset of .
 BitSetOffset (A &a, const BitSetOffset &bs)
 Copy bit set bs.
 ~BitSetOffset (void)
 Destructor.
bool get (int i) const
 Access value at bit i.
void set (int i)
 Set bit i.
void clear (int i)
 Clear bit i.
int next (int i) const
 Return position greater or equal i of next set bit (i is allowed to be equal to size).
void resize (A &a, unsigned int n, int offset, bool set=false)
 Resize bitset to n elements with specified offset.
int offset (void) const
 Retrieve the minimum valid index (the offset).
int max_bit (void) const
 Retrieve the maximum valid index.
bool valid (int i) const
 Is the bit index valid for this bitset?

Protected Attributes

A & a
 Allocator.
int _offset
 Offset.

Detailed Description

template<class A>
class Gecode::Support::BitSetOffset< A >

Bitsets with index offset.

The valid range of indices for a BitSetOffset with s bits and an offset of o is [o, o+1, ..., o+s-1].

Definition at line 55 of file bitset-offset.hpp.


Constructor & Destructor Documentation

template<class A>
Gecode::Support::BitSetOffset< A >::BitSetOffset ( A &  a,
unsigned int  s,
int  o 
) [inline]

Bit set with space for s bits with offset of .

Definition at line 94 of file bitset-offset.hpp.

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

Copy bit set bs.

Definition at line 99 of file bitset-offset.hpp.

template<class A >
Gecode::Support::BitSetOffset< A >::~BitSetOffset ( void   )  [inline]

Destructor.

Definition at line 104 of file bitset-offset.hpp.


Member Function Documentation

template<class A >
bool Gecode::Support::BitSetOffset< A >::get ( int  i  )  const [inline]

Access value at bit i.

Definition at line 110 of file bitset-offset.hpp.

template<class A >
void Gecode::Support::BitSetOffset< A >::set ( int  i  )  [inline]

Set bit i.

Definition at line 114 of file bitset-offset.hpp.

template<class A >
void Gecode::Support::BitSetOffset< A >::clear ( int  i  )  [inline]

Clear bit i.

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

template<class A >
int Gecode::Support::BitSetOffset< A >::next ( 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 122 of file bitset-offset.hpp.

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

Resize bitset to n elements with specified offset.

Definition at line 126 of file bitset-offset.hpp.

template<class A >
int Gecode::Support::BitSetOffset< A >::offset ( void   )  const [inline]

Retrieve the minimum valid index (the offset).

Definition at line 133 of file bitset-offset.hpp.

template<class A >
int Gecode::Support::BitSetOffset< A >::max_bit ( void   )  const [inline]

Retrieve the maximum valid index.

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

template<class A >
bool Gecode::Support::BitSetOffset< A >::valid ( int  i  )  const [inline]

Is the bit index valid for this bitset?

Definition at line 141 of file bitset-offset.hpp.


Member Data Documentation

template<class A>
A& Gecode::Support::BitSetOffset< A >::a [protected]

Allocator.

Definition at line 58 of file bitset-offset.hpp.

template<class A>
int Gecode::Support::BitSetOffset< A >::_offset [protected]

Offset.

Definition at line 60 of file bitset-offset.hpp.


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