BitMagic-C++
|
Compressed (sparse collection of objects) More...
#include <bmsparsevec_util.h>
Data Structures | |
struct | statistics |
collection statistics More... | |
Public Types | |
typedef BV | bvector_type |
typedef serializer< BV >::buffer | buffer_type |
typedef compressed_collection< typename serializer< BV >::buffer, BV > | parent_type |
![]() | |
typedef BV | bvector_type |
typedef BV::size_type | size_type |
typedef size_type | key_type |
typedef size_type | address_type |
typedef serializer< BV >::buffer | value_type |
typedef serializer< BV >::buffer | mapped_type |
typedef std::vector< value_type > | container_type |
typedef bm::bvps_addr_resolver< bvector_type > | address_resolver_type |
Public Member Functions | |
bool | move_buffer (typename parent_type::key_type key, buffer_type &buffer) |
move external buffer into collection | |
void | calc_stat (statistics *st) const |
compute statistics on memory consumption | |
![]() | |
compressed_collection () | |
bool | push_back (key_type key, const value_type &val) |
Add new value to compressed collection. | |
const value_type & | at (key_type key) const |
find and return const associated value (with bounds/presense checking) | |
value_type & | at (key_type key) |
find and return associated value (with bounds/presense checking) | |
void | sync () |
Checkpoint method to prepare collection for reading. | |
void | optimize (bm::word_t *temp_block=0) |
perform memory optimizations/compression | |
bool | resolve (key_type key, address_type *addr) const |
Resolve key address (index) in the dense vector. | |
const value_type & | get (address_type addr) const |
Get access to associated value by resolved address. | |
const address_resolver_type & | resolver () const |
Get address resolver. | |
address_resolver_type & | resolver () |
Get address resolver. | |
size_t | size () const |
size of collection | |
bool | equal (const compressed_collection< serializer< BV >::buffer, BV > &ccoll) const |
perform equality comparison with another collection | |
container_type & | container () |
return dense container for direct access (this should be treated as an internal function designed for deserialization) | |
Additional Inherited Members | |
![]() | |
void | throw_range_error (const char *err_msg) const |
![]() | |
address_resolver_type | addr_res_ |
address resolver | |
container_type | dense_vect_ |
compressed space container | |
key_type | last_add_ |
last added element | |
Compressed (sparse collection of objects)
Definition at line 312 of file bmsparsevec_util.h.
serializer<BV>::buffer bm::compressed_buffer_collection< BV >::buffer_type |
Definition at line 317 of file bmsparsevec_util.h.
BV bm::compressed_buffer_collection< BV >::bvector_type |
Definition at line 316 of file bmsparsevec_util.h.
compressed_collection<typename serializer<BV>::buffer, BV> bm::compressed_buffer_collection< BV >::parent_type |
Definition at line 318 of file bmsparsevec_util.h.
|
inline |
compute statistics on memory consumption
Definition at line 342 of file bmsparsevec_util.h.
References bm::compressed_collection< serializer< BV >::buffer, BV >::addr_res_, BM_ASSERT, bm::compressed_collection< serializer< BV >::buffer, BV >::dense_vect_, bm::bvps_addr_resolver< BV >::get_bvector(), bm::compressed_buffer_collection< BV >::statistics::max_serialize_mem, and bm::compressed_buffer_collection< BV >::statistics::memory_used.
|
inline |
move external buffer into collection
Definition at line 330 of file bmsparsevec_util.h.
References bm::compressed_collection< serializer< BV >::buffer, BV >::at(), and bm::compressed_collection< serializer< BV >::buffer, BV >::push_back().