TiledArray::detail::Bitset< Block > Class Template Reference
Documentation
template<typename Block = unsigned long>
class TiledArray::detail::Bitset< Block >
Fixed size bitset.
Bitset is similar to std::bitset except the size is set at runtime. This bit set has very limited functionality, because it is only intended to fit the needs of SparseShape. The block type may be an integral or char type.
- Template Parameters
-
Block The type used to store the data [ default = unsignedlong]
Classes | |
| class | reference |
Public Types | |
| typedef Bitset< Block > | Bitset_ |
| This object type. More... | |
| typedef Block | block_type |
| The type used to store the data. More... | |
| typedef Block | value_type |
| The value type. More... | |
| typedef Block | const_reference |
| Constant reference to a bit. More... | |
| typedef std::size_t | size_type |
| indexing size type More... | |
| typedef UnaryTransformIterator< Block, ConstTransformOp > | const_iterator |
| Const iterator type. More... | |
| typedef UnaryTransformIterator< Block, TransformOp > | iterator |
| Iterator type. More... | |
Public Member Functions | |
| Bitset (size_type s) | |
Construct a bitset that contains s bits. More... | |
| template<typename InIter > | |
| Bitset (InIter first, InIter last) | |
Construct a bitset that contains s bits. More... | |
| Bitset (const Bitset< Block > &other) | |
| Copy constructor for bitset. More... | |
| ~Bitset () | |
| Destructor. More... | |
| Bitset< Block > & | operator= (const Bitset< Block > &other) |
| Assignment operator. More... | |
| Bitset< Block > & | operator|= (const Bitset< Block > &other) |
| Or-assignment operator. More... | |
| Bitset< Block > & | operator&= (const Bitset< Block > &other) |
| And-assignment operator. More... | |
| Bitset< Block > & | operator^= (const Bitset< Block > &other) |
| And-assignment operator. More... | |
| Bitset< Block > & | operator<<= (size_type n) |
| Bitset< Block > | operator<< (size_type n) |
| Bitset< Block > & | operator>>= (size_type n) |
| Bitset< Block > | operator>> (size_type n) |
| const_reference | operator[] (size_type i) const |
| Bit accessor operator. More... | |
| reference | operator[] (size_type i) |
| operator bool () const | |
| bool | operator! () const |
| const_iterator | begin () const |
| iterator | begin () |
| const_iterator | end () const |
| iterator | end () |
| void | set (size_type i, bool value=true) |
| Set a bit value. More... | |
| void | set () |
| Set all bits. More... | |
| void | set_range (size_type first, size_type last) |
| Set all bits from first to last. More... | |
| void | set_stride (size_type first, size_type stride) |
Set elements separated by stride. More... | |
| void | reset (size_type i) |
| Reset a bit. More... | |
| void | reset () |
| Set all bits. More... | |
| void | flip (size_type i) |
| Flip a bit. More... | |
| void | flip () |
| Flip all bits. More... | |
| size_type | count () const |
| Count the number of non-zero bits. More... | |
| const block_type * | get () const |
| Data pointer accessor. More... | |
| block_type * | get () |
| Data pointer accessor. More... | |
| size_type | size () const |
| Bitset size. More... | |
| size_type | num_blocks () const |
| Bitset block size. More... | |
| void | swap (Bitset_ &other) |
Member Typedef Documentation
◆ Bitset_
template<typename Block = unsigned long>
| typedef Bitset<Block> TiledArray::detail::Bitset< Block >::Bitset_ |
◆ block_type
template<typename Block = unsigned long>
| typedef Block TiledArray::detail::Bitset< Block >::block_type |
◆ const_iterator
template<typename Block = unsigned long>
| typedef UnaryTransformIterator<Block, ConstTransformOp> TiledArray::detail::Bitset< Block >::const_iterator |
◆ const_reference
template<typename Block = unsigned long>
| typedef Block TiledArray::detail::Bitset< Block >::const_reference |
◆ iterator
template<typename Block = unsigned long>
| typedef UnaryTransformIterator<Block, TransformOp> TiledArray::detail::Bitset< Block >::iterator |
◆ size_type
template<typename Block = unsigned long>
| typedef std::size_t TiledArray::detail::Bitset< Block >::size_type |
◆ value_type
template<typename Block = unsigned long>
| typedef Block TiledArray::detail::Bitset< Block >::value_type |
Constructor & Destructor Documentation
◆ Bitset() [1/3]
template<typename Block = unsigned long>
|
inline |
◆ Bitset() [2/3]
template<typename Block = unsigned long>
template<typename InIter >
|
inline |
Construct a bitset that contains s bits.
- Template Parameters
-
InIter The input iterator type
- Parameters
-
first The first element of a set of bits to be set last The last element of a set of bits to be set
- Exceptions
-
std::bad_alloc If bitset allocation fails.
Definition at line 184 of file bitset.h.
Here is the call graph for this function:

◆ Bitset() [3/3]
template<typename Block = unsigned long>
|
inline |
◆ ~Bitset()
template<typename Block = unsigned long>
|
inline |
Member Function Documentation
◆ begin() [1/2]
template<typename Block = unsigned long>
|
inline |
◆ begin() [2/2]
template<typename Block = unsigned long>
|
inline |
◆ count()
template<typename Block = unsigned long>
|
inline |
◆ end() [1/2]
template<typename Block = unsigned long>
|
inline |
◆ end() [2/2]
template<typename Block = unsigned long>
|
inline |
◆ flip() [1/2]
template<typename Block = unsigned long>
|
inline |
◆ flip() [2/2]
template<typename Block = unsigned long>
|
inline |
◆ get() [1/2]
template<typename Block = unsigned long>
|
inline |
Data pointer accessor.
The pointer to the data points to a contiguous block of memory of type block_type that contains num_blocks() elements.
- Returns
- A pointer to the first element of the bitset data
- Exceptions
-
nothing
◆ get() [2/2]
template<typename Block = unsigned long>
|
inline |
Data pointer accessor.
The pointer to the data points to a contiguous block of memory of type block_type that contains num_blocks() elements.
- Returns
- A pointer to the first element of the bitset data
- Exceptions
-
nothing
Definition at line 512 of file bitset.h.
Here is the caller graph for this function:

◆ num_blocks()
template<typename Block = unsigned long>
|
inline |
◆ operator bool()
template<typename Block = unsigned long>
|
inline |
◆ operator!()
template<typename Block = unsigned long>
|
inline |
◆ operator&=()
template<typename Block = unsigned long>
|
inline |
◆ operator<<()
template<typename Block = unsigned long>
|
inline |
◆ operator<<=()
template<typename Block = unsigned long>
|
inline |
◆ operator=()
template<typename Block = unsigned long>
|
inline |
◆ operator>>()
template<typename Block = unsigned long>
|
inline |
◆ operator>>=()
template<typename Block = unsigned long>
|
inline |
◆ operator[]() [1/2]
template<typename Block = unsigned long>
|
inline |
◆ operator[]() [2/2]
template<typename Block = unsigned long>
|
inline |
◆ operator^=()
template<typename Block = unsigned long>
|
inline |
◆ operator|=()
template<typename Block = unsigned long>
|
inline |
◆ reset() [1/2]
template<typename Block = unsigned long>
|
inline |
◆ reset() [2/2]
template<typename Block = unsigned long>
|
inline |
◆ set() [1/2]
template<typename Block = unsigned long>
|
inline |
◆ set() [2/2]
template<typename Block = unsigned long>
|
inline |
◆ set_range()
template<typename Block = unsigned long>
|
inline |
◆ set_stride()
template<typename Block = unsigned long>
|
inline |
◆ size()
template<typename Block = unsigned long>
|
inline |
◆ swap()
template<typename Block = unsigned long>
|
inline |
The documentation for this class was generated from the following file:
- TiledArray/bitset.h












1.8.20