|
BitMagic-C++
|
Constant iterator designed to enumerate "ON" bits. More...
#include <bm.h>


Public Types | |
| typedef std::input_iterator_tag | iterator_category |
| typedef size_type | value_type |
| typedef unsigned | difference_type |
| typedef unsigned * | pointer |
| typedef unsigned & | reference |
Public Member Functions | |
| enumerator () | |
| enumerator (const bvector< Alloc > *bv) | |
| Construct enumerator associated with a vector. This construction creates unpositioned iterator with status valid() == false. It can be re-positioned using go_first() or go_to() More... | |
| enumerator (const bvector< Alloc > *bv, size_type pos) | |
| Construct enumerator for bit vector. More... | |
| size_type | operator* () const |
| Get current position (value) More... | |
| size_type | value () const |
| Get current position (value) More... | |
| enumerator & | operator++ () |
| Advance enumerator forward to the next available bit. More... | |
| enumerator | operator++ (int) |
| Advance enumerator forward to the next available bit. Possibly do NOT use this operator it is slower than the pre-fix increment. More... | |
| void | go_first () |
| Position enumerator to the first available bit. More... | |
| void | advance () |
| advance iterator forward by one More... | |
| enumerator & | go_up () |
| Advance enumerator to the next available bit. More... | |
| enumerator & | skip_to_rank (size_type rank) |
| Skip to specified relative rank. More... | |
| enumerator & | skip (size_type rank) |
| Skip specified number of bits from enumeration. More... | |
| enumerator & | go_to (size_type pos) |
| go to a specific position in the bit-vector (or next) More... | |
Public Member Functions inherited from bm::bvector< Alloc >::iterator_base | |
| iterator_base () | |
| bool | operator== (const iterator_base &it) const |
| bool | operator!= (const iterator_base &it) const |
| bool | operator< (const iterator_base &it) const |
| bool | operator<= (const iterator_base &it) const |
| bool | operator> (const iterator_base &it) const |
| bool | operator>= (const iterator_base &it) const |
| bool | valid () const |
| Checks if iterator is still valid. More... | |
| void | invalidate () |
| Turns iterator into an invalid state. More... | |
| bool | compare_state (const iterator_base &ib) const |
| Compare FSMs for testing purposes. More... | |
Additional Inherited Members | |
Protected Attributes inherited from bm::bvector< Alloc >::iterator_base | |
| bm::bvector< Alloc > * | bv_ |
| Pointer on parent bitvector. More... | |
| size_type | position_ |
| Bit position (bit idx) More... | |
| const bm::word_t * | block_ |
| Block pointer.(NULL-invalid) More... | |
| unsigned | block_type_ |
| Type of block. 0-Bit, 1-GAP. More... | |
| block_idx_type | block_idx_ |
| Block index. More... | |
| union bm::bvector::iterator_base::block_descr | bdescr_ |
Constant iterator designed to enumerate "ON" bits.
| typedef unsigned bm::bvector< Alloc >::enumerator::difference_type |
| typedef std::input_iterator_tag bm::bvector< Alloc >::enumerator::iterator_category |
| typedef unsigned* bm::bvector< Alloc >::enumerator::pointer |
| typedef unsigned& bm::bvector< Alloc >::enumerator::reference |
| typedef size_type bm::bvector< Alloc >::enumerator::value_type |
|
inline |
|
inline |
Construct enumerator associated with a vector. This construction creates unpositioned iterator with status valid() == false. It can be re-positioned using go_first() or go_to()
|
inline |
|
inline |
advance iterator forward by one
Definition at line 717 of file bm.h.
Referenced by bm::rsc_sparse_vector< Val, SV >::decode().
|
inline |
Position enumerator to the first available bit.
Definition at line 649 of file bm.h.
References bm::bits_in_array, bm::bits_in_block, BM_ASSERT, BM_IS_GAP, FULL_BLOCK_FAKE_ADDR, FULL_BLOCK_REAL_ADDR, FULL_SUB_BLOCK_REAL_ADDR, and bm::set_sub_array_size.
|
inline |
go to a specific position in the bit-vector (or next)
Definition at line 879 of file bm.h.
References bm::bvector< Alloc >::iterator_base::block_descr::bit_, bm::bvector< Alloc >::iterator_base::bitblock_descr::bits, bm::bits_in_array, bm::bits_in_block, bm::bitscan_wave(), BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::bvector< Alloc >::iterator_base::bitblock_descr::cnt, bm::bvector< Alloc >::first(), FULL_BLOCK_FAKE_ADDR, FULL_BLOCK_REAL_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::bvector< Alloc >::iterator_base::block_descr::gap_, bm::gap_bfind(), bm::bvector< Alloc >::iterator_base::dgap_descr::gap_len, bm::gap_max_bits, bm::bvector< Alloc >::iterator_base::bitblock_descr::idx, bm::bvector< Alloc >::iterator_base::bitblock_descr::pos, bm::bvector< Alloc >::iterator_base::bitblock_descr::ptr, bm::bvector< Alloc >::iterator_base::dgap_descr::ptr, bm::bvector< Alloc >::rank(), bm::set_array_mask, bm::set_array_shift, bm::set_bitscan_wave_size, bm::set_block_mask, bm::set_block_shift, bm::set_block_size, bm::set_sub_array_size, bm::set_word_mask, bm::set_word_shift, and bm::word_bitcount64().
Referenced by main().
|
inline |
Advance enumerator to the next available bit.
Definition at line 721 of file bm.h.
References bm::bvector< Alloc >::iterator_base::block_descr::bit_, bm::bvector< Alloc >::iterator_base::bitblock_descr::bits, BM_ASSERT, BM_ASSERT_THROW, bm::bvector< Alloc >::iterator_base::block_descr::gap_, bm::bvector< Alloc >::iterator_base::dgap_descr::gap_len, bm::gap_max_bits, bm::bvector< Alloc >::iterator_base::bitblock_descr::idx, bm::bvector< Alloc >::iterator_base::bitblock_descr::pos, bm::bvector< Alloc >::iterator_base::bitblock_descr::ptr, bm::bvector< Alloc >::iterator_base::dgap_descr::ptr, and bm::set_bitscan_wave_size.
|
inline |
|
inline |
|
inline |
|
inline |
Skip specified number of bits from enumeration.
| rank | - number of ON bits to skip |
Definition at line 806 of file bm.h.
References bm::bvector< Alloc >::iterator_base::block_descr::bit_, bm::bvector< Alloc >::iterator_base::bitblock_descr::bits, BM_ASSERT, bm::bvector< Alloc >::iterator_base::block_descr::gap_, bm::bvector< Alloc >::iterator_base::dgap_descr::gap_len, bm::gap_max_bits, bm::bvector< Alloc >::iterator_base::bitblock_descr::idx, bm::bvector< Alloc >::iterator_base::bitblock_descr::pos, bm::bvector< Alloc >::iterator_base::bitblock_descr::ptr, bm::bvector< Alloc >::iterator_base::dgap_descr::ptr, bm::bvector< Alloc >::rank(), and bm::set_bitscan_wave_size.
|
inline |
Skip to specified relative rank.
| rank | - number of ON bits to go for |
Definition at line 794 of file bm.h.
References bm::bvector< Alloc >::rank().
|
inline |
1.8.13