BitMagic-C++
Data Structures | Public Types | Public Member Functions
bm::compressed_buffer_collection< BV > Class Template Reference

Compressed (sparse collection of objects) More...

#include <bmsparsevec_util.h>

Inheritance diagram for bm::compressed_buffer_collection< BV >:
Inheritance graph
[legend]
Collaboration diagram for bm::compressed_buffer_collection< BV >:
Collaboration graph
[legend]

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
 
- Public Types inherited from bm::compressed_collection< serializer< BV >::buffer, BV >
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_typecontainer_type
 
typedef bm::bvps_addr_resolver< bvector_typeaddress_resolver_type
 

Public Member Functions

bool move_buffer (typename parent_type::key_type key, buffer_type &buffer)
 move external buffer into collection More...
 
void calc_stat (statistics *st) const
 compute statistics on memory consumption More...
 
- Public Member Functions inherited from bm::compressed_collection< serializer< BV >::buffer, BV >
 compressed_collection ()
 
bool push_back (key_type key, const value_type &val)
 Add new value to compressed collection. More...
 
const value_typeat (key_type key) const
 find and return const associated value (with bounds/presense checking) More...
 
value_typeat (key_type key)
 find and return associated value (with bounds/presense checking) More...
 
void sync ()
 Checkpoint method to prepare collection for reading. More...
 
void optimize (bm::word_t *temp_block=0)
 perform memory optimizations/compression More...
 
bool resolve (key_type key, address_type *addr) const
 Resolve key address (index) in the dense vector. More...
 
const value_typeget (address_type addr) const
 Get access to associated value by resolved address. More...
 
const address_resolver_typeresolver () const
 Get address resolver. More...
 
address_resolver_typeresolver ()
 Get address resolver. More...
 
size_t size () const
 size of collection More...
 
bool equal (const compressed_collection< serializer< BV >::buffer, BV > &ccoll) const
 perform equality comparison with another collection More...
 
container_typecontainer ()
 return dense container for direct access (this should be treated as an internal function designed for deserialization) More...
 

Additional Inherited Members

- Protected Member Functions inherited from bm::compressed_collection< serializer< BV >::buffer, BV >
void throw_range_error (const char *err_msg) const
 
- Protected Attributes inherited from bm::compressed_collection< serializer< BV >::buffer, BV >
address_resolver_type addr_res_
 address resolver More...
 
container_type dense_vect_
 compressed space container More...
 
key_type last_add_
 last added element More...
 

Detailed Description

template<class BV>
class bm::compressed_buffer_collection< BV >

Compressed (sparse collection of objects)

Definition at line 312 of file bmsparsevec_util.h.

Member Function Documentation

◆ calc_stat()

template<class BV >
void bm::compressed_buffer_collection< BV >::calc_stat ( statistics st) const
inline

◆ move_buffer()

template<class BV >
bool bm::compressed_buffer_collection< BV >::move_buffer ( typename parent_type::key_type  key,
buffer_type buffer 
)
inline

The documentation for this class was generated from the following file: