|
BitMagic-C++
|
Const iterator to traverse the rsc sparse vector. More...
#include <bmsparsevec_compr.h>
Public Types | |
| typedef std::input_iterator_tag | iterator_category |
| typedef rsc_sparse_vector< Val, SV > | rsc_sparse_vector_type |
| typedef rsc_sparse_vector_type * | rsc_sparse_vector_type_ptr |
| typedef rsc_sparse_vector_type::value_type | value_type |
| typedef rsc_sparse_vector_type::size_type | size_type |
| typedef rsc_sparse_vector_type::bvector_type | bvector_type |
| typedef bvector_type::allocator_type | allocator_type |
| typedef bvector_type::allocator_type::allocator_pool_type | allocator_pool_type |
| typedef bm::byte_buffer< allocator_type > | buffer_type |
| typedef unsigned | difference_type |
| typedef unsigned * | pointer |
| typedef value_type & | reference |
Public Member Functions | |
| const_iterator () BMNOEXCEPT | |
| const_iterator (const rsc_sparse_vector_type *csv) BMNOEXCEPT | |
| const_iterator (const rsc_sparse_vector_type *csv, size_type pos) BMNOEXCEPT | |
| const_iterator (const const_iterator &it) BMNOEXCEPT | |
| bool | operator== (const const_iterator &it) const BMNOEXCEPT |
| bool | operator!= (const const_iterator &it) const BMNOEXCEPT |
| bool | operator< (const const_iterator &it) const BMNOEXCEPT |
| bool | operator<= (const const_iterator &it) const BMNOEXCEPT |
| bool | operator> (const const_iterator &it) const BMNOEXCEPT |
| bool | operator>= (const const_iterator &it) const BMNOEXCEPT |
| value_type | operator* () const |
| Get current position (value). | |
| const_iterator & | operator++ () BMNOEXCEPT |
| Advance to the next available value. | |
| const_iterator & | operator++ (int) |
| Advance to the next available value. | |
| value_type | value () const |
| Get current position (value). | |
| bool | is_null () const BMNOEXCEPT |
| Get NULL status. | |
| bool | valid () const BMNOEXCEPT |
| Returns true if iterator is at a valid position. | |
| void | invalidate () BMNOEXCEPT |
| Invalidate current iterator. | |
| size_type | pos () const BMNOEXCEPT |
| Current position (index) in the vector. | |
| void | go_to (size_type pos) BMNOEXCEPT |
| re-position to a specified position | |
| bool | advance () BMNOEXCEPT |
| advance iterator forward by one | |
| void | skip_zero_values () BMNOEXCEPT |
Friends | |
| class | rsc_sparse_vector |
Const iterator to traverse the rsc sparse vector.
Implementation uses buffer for decoding so, competing changes to the original vector may not match the iterator returned values.
This iterator keeps an operational buffer, memory footprint is not negligable
Definition at line 126 of file bmsparsevec_compr.h.
| typedef bvector_type::allocator_type::allocator_pool_type bm::rsc_sparse_vector< Val, SV >::const_iterator::allocator_pool_type |
Definition at line 141 of file bmsparsevec_compr.h.
| typedef bvector_type::allocator_type bm::rsc_sparse_vector< Val, SV >::const_iterator::allocator_type |
Definition at line 139 of file bmsparsevec_compr.h.
| typedef bm::byte_buffer<allocator_type> bm::rsc_sparse_vector< Val, SV >::const_iterator::buffer_type |
Definition at line 142 of file bmsparsevec_compr.h.
| typedef rsc_sparse_vector_type::bvector_type bm::rsc_sparse_vector< Val, SV >::const_iterator::bvector_type |
Definition at line 138 of file bmsparsevec_compr.h.
| typedef unsigned bm::rsc_sparse_vector< Val, SV >::const_iterator::difference_type |
Definition at line 144 of file bmsparsevec_compr.h.
| typedef std::input_iterator_tag bm::rsc_sparse_vector< Val, SV >::const_iterator::iterator_category |
Definition at line 132 of file bmsparsevec_compr.h.
| typedef unsigned* bm::rsc_sparse_vector< Val, SV >::const_iterator::pointer |
Definition at line 145 of file bmsparsevec_compr.h.
| typedef value_type& bm::rsc_sparse_vector< Val, SV >::const_iterator::reference |
Definition at line 146 of file bmsparsevec_compr.h.
| typedef rsc_sparse_vector<Val, SV> bm::rsc_sparse_vector< Val, SV >::const_iterator::rsc_sparse_vector_type |
Definition at line 134 of file bmsparsevec_compr.h.
| typedef rsc_sparse_vector_type* bm::rsc_sparse_vector< Val, SV >::const_iterator::rsc_sparse_vector_type_ptr |
Definition at line 135 of file bmsparsevec_compr.h.
| typedef rsc_sparse_vector_type::size_type bm::rsc_sparse_vector< Val, SV >::const_iterator::size_type |
Definition at line 137 of file bmsparsevec_compr.h.
| typedef rsc_sparse_vector_type::value_type bm::rsc_sparse_vector< Val, SV >::const_iterator::value_type |
Definition at line 136 of file bmsparsevec_compr.h.
| bm::rsc_sparse_vector< Val, BV >::const_iterator::const_iterator | ( | ) |
Definition at line 2089 of file bmsparsevec_compr.h.
References BMNOEXCEPT, and bm::id_max.
Referenced by const_iterator(), const_iterator(), const_iterator(), operator!=(), operator++(), operator++(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
| bm::rsc_sparse_vector< Val, SV >::const_iterator::const_iterator | ( | const rsc_sparse_vector_type * | csv | ) |
References BMNOEXCEPT, and const_iterator().
| bm::rsc_sparse_vector< Val, SV >::const_iterator::const_iterator | ( | const rsc_sparse_vector_type * | csv, |
| size_type | pos ) |
References BMNOEXCEPT, const_iterator(), and pos().
| bm::rsc_sparse_vector< Val, SV >::const_iterator::const_iterator | ( | const const_iterator & | it | ) |
References BMNOEXCEPT, and const_iterator().
| bool bm::rsc_sparse_vector< Val, SV >::const_iterator::advance | ( | ) |
advance iterator forward by one
Definition at line 2137 of file bmsparsevec_compr.h.
References BMNOEXCEPT, bm::id_max, and invalidate().
Referenced by operator++(), and operator++().
| void bm::rsc_sparse_vector< Val, SV >::const_iterator::go_to | ( | size_type | pos | ) |
re-position to a specified position
Definition at line 2128 of file bmsparsevec_compr.h.
References BMNOEXCEPT, bm::id_max, and pos().
|
inline |
Invalidate current iterator.
Definition at line 189 of file bmsparsevec_compr.h.
References BMNOEXCEPT, and bm::id_max.
Referenced by advance().
| bool bm::rsc_sparse_vector< Val, SV >::const_iterator::is_null | ( | ) | const |
|
inline |
Definition at line 156 of file bmsparsevec_compr.h.
References BMNOEXCEPT, const_iterator(), and operator==().
|
inline |
Get current position (value).
Definition at line 168 of file bmsparsevec_compr.h.
References value().
|
inline |
Advance to the next available value.
Definition at line 172 of file bmsparsevec_compr.h.
References advance(), BMNOEXCEPT, and const_iterator().
|
inline |
Advance to the next available value.
Definition at line 175 of file bmsparsevec_compr.h.
References advance(), and const_iterator().
|
inline |
Definition at line 158 of file bmsparsevec_compr.h.
References BMNOEXCEPT, and const_iterator().
|
inline |
Definition at line 160 of file bmsparsevec_compr.h.
References BMNOEXCEPT, and const_iterator().
|
inline |
Definition at line 154 of file bmsparsevec_compr.h.
References BMNOEXCEPT, and const_iterator().
Referenced by operator!=().
|
inline |
Definition at line 162 of file bmsparsevec_compr.h.
References BMNOEXCEPT, and const_iterator().
|
inline |
Definition at line 164 of file bmsparsevec_compr.h.
References BMNOEXCEPT, and const_iterator().
|
inline |
Current position (index) in the vector.
Definition at line 192 of file bmsparsevec_compr.h.
References BMNOEXCEPT.
Referenced by const_iterator(), and go_to().
| void bm::rsc_sparse_vector< Val, SV >::const_iterator::skip_zero_values | ( | ) |
Definition at line 2181 of file bmsparsevec_compr.h.
References BMNOEXCEPT, bm::id_max, and value().
|
inline |
Returns true if iterator is at a valid position.
Definition at line 186 of file bmsparsevec_compr.h.
References BMNOEXCEPT, bm::id_max, and valid().
| rsc_sparse_vector< Val, SV >::const_iterator::value_type bm::rsc_sparse_vector< Val, SV >::const_iterator::value | ( | ) | const |
Get current position (value).
Definition at line 2160 of file bmsparsevec_compr.h.
References BM_ASSERT, and valid().
Referenced by operator*(), and skip_zero_values().
|
friend |
Definition at line 129 of file bmsparsevec_compr.h.
References rsc_sparse_vector.
Referenced by rsc_sparse_vector.