BitMagic-C++
|
Back insert iterator implements buffered insert, faster than generic access assignment. More...
#include <bmsparsevec.h>
Public Types | |
typedef std::output_iterator_tag | iterator_category |
typedef sparse_vector< Val, BV > | sparse_vector_type |
typedef sparse_vector_type * | sparse_vector_type_ptr |
typedef sparse_vector_type::value_type | value_type |
typedef sparse_vector_type::unsigned_value_type | unsigned_value_type |
typedef sparse_vector_type::size_type | size_type |
typedef 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 void | difference_type |
typedef void | pointer |
typedef void | reference |
Public Member Functions | |
void | operator= (value_type v) |
push value to the vector More... | |
back_insert_iterator & | operator* () |
noop More... | |
back_insert_iterator & | operator++ () |
noop More... | |
back_insert_iterator & | operator++ (int) |
noop More... | |
void | add (value_type v) |
add value to the container More... | |
void | add_null () |
add NULL (no-value) to the container More... | |
void | add_null (size_type count) |
add a series of consequitve NULLs (no-value) to the container More... | |
bool | empty () const |
return true if insertion buffer is empty More... | |
bool | flush () |
flush the accumulated buffer More... | |
bvector_type * | get_null_bvect () const BMNOEXCEPT |
Get access to not-null vector. More... | |
void | add_value_no_null (value_type v) |
add value to the buffer without changing the NULL vector More... | |
void | disable_set_null () BMNOEXCEPT |
Reconfigure back inserter not to touch the NULL vector. More... | |
Construction and assignment <br> | |
back_insert_iterator () | |
back_insert_iterator (sparse_vector_type *sv) | |
back_insert_iterator (const back_insert_iterator &bi) | |
void | operator= (const back_insert_iterator &bi) |
More... | |
back_insert_iterator (back_insert_iterator &&bi) BMNOEXCEPT | |
move constructor More... | |
void | operator= (back_insert_iterator &&bi) BMNOEXCEPT |
move assignment More... | |
~back_insert_iterator () | |
Protected Types | |
typedef bvector_type::block_idx_type | block_idx_type |
Back insert iterator implements buffered insert, faster than generic access assignment.
Limitations for buffered inserter:
Definition at line 255 of file bmsparsevec.h.
bm::sparse_vector< Val, BV >::back_insert_iterator::back_insert_iterator | ( | back_insert_iterator && | bi | ) |
move constructor
void bm::sparse_vector< Val, BV >::back_insert_iterator::add | ( | value_type | v | ) |
void bm::sparse_vector< Val, BV >::back_insert_iterator::add_null |
add NULL (no-value) to the container
Definition at line 2513 of file bmsparsevec.h.
References BM_ASSERT.
Referenced by main().
void bm::sparse_vector< Val, BV >::back_insert_iterator::add_null | ( | size_type | count | ) |
add a series of consequitve NULLs (no-value) to the container
BMFORCEINLINE void bm::sparse_vector< Val, BV >::back_insert_iterator::add_value_no_null | ( | value_type | v | ) |
add value to the buffer without changing the NULL vector
v | - value to push back |
Definition at line 2493 of file bmsparsevec.h.
References BM_ASSERT, bm::sparse_vector< Val, BV >::n_buf_size, and bm::base_sparse_vector< Val, BV, 1 >::s2u().
|
inline |
Reconfigure back inserter not to touch the NULL vector.
Definition at line 354 of file bmsparsevec.h.
bool bm::sparse_vector< Val, BV >::back_insert_iterator::empty |
return true if insertion buffer is empty
Definition at line 2540 of file bmsparsevec.h.
Referenced by bm::sparse_vector< Val, BV >::back_insert_iterator::operator=().
bool bm::sparse_vector< Val, BV >::back_insert_iterator::flush |
flush the accumulated buffer
Definition at line 2548 of file bmsparsevec.h.
References bm::set_block_shift.
|
inline |
Get access to not-null vector.
Definition at line 343 of file bmsparsevec.h.
|
inline |
noop
Definition at line 312 of file bmsparsevec.h.
|
inline |
noop
Definition at line 314 of file bmsparsevec.h.
|
inline |
noop
Definition at line 316 of file bmsparsevec.h.
|
inline |
move assignment
Definition at line 295 of file bmsparsevec.h.
|
inline |
Definition at line 283 of file bmsparsevec.h.
References BM_ASSERT, bm::sparse_vector< Val, BV >::back_insert_iterator::empty(), and bm::sparse_vector< Val, BV >::n_buf_size.
|
inline |
push value to the vector
Definition at line 310 of file bmsparsevec.h.