chunkedseq
container library for large in-memory data sets
|
#include <chunkedbag.hpp>
Classes | |
class | DummyCachePrinter |
Public Types | |
using | iterator = Iterator< self_type, config_type > |
Container-configuration types | |
using | config_type = Configuration |
using | self_type = chunkedbagbase< config_type > |
using | size_type = typename config_type::size_type |
using | difference_type = typename config_type::difference_type |
using | allocator_type = typename config_type::item_allocator_type |
Item-specific types | |
using | value_type = typename config_type::value_type |
using | reference = value_type & |
using | const_reference = const value_type & |
using | pointer = value_type * |
using | const_pointer = const value_type * |
using | segment_type = typename config_type::segment_type |
Cached-measure-specific types | |
using | cache_type = chunk_cache_type |
using | measured_type = typename cache_type::measured_type |
using | algebra_type = typename cache_type::algebra_type |
using | measure_type = typename cache_type::measure_type |
Public Member Functions | |
Constructors | |
chunkedbagbase () | |
chunkedbagbase (const measure_type &meas) | |
chunkedbagbase (const self_type &other) | |
chunkedbagbase (std::initializer_list< value_type > l) | |
Capacity | |
bool | empty () const |
size_type | size () const |
Item access | |
value_type | back () |
value_type | front () |
value_type | top () |
void | backn (value_type *dst, size_type nb) const |
void | frontn (value_type *dst, size_type nb) const |
template<class Consumer > | |
void | stream_backn (const Consumer &cons, size_type nb) const |
template<class Consumer > | |
void | stream_frontn (const Consumer &cons, size_type nb) const |
value_type | operator[] (size_type n) const |
Modifiers | |
void | push_back (const value_type &x) |
void | push_front (const value_type &x) |
void | push (const value_type &x) |
value_type | pop_back () |
value_type | pop_front () |
value_type | pop () |
void | pushn_back (const_pointer src, size_type nb) |
void | pushn_front (const_pointer src, size_type nb) |
void | pushn (const_pointer src, size_type nb) |
void | popn_front (size_type nb) |
void | popn (size_type nb) |
void | popn_back (size_type nb) |
void | popn_back (value_type *dst, size_type nb) |
void | popn_front (value_type *dst, size_type nb) |
void | popn (value_type *dst, size_type nb) |
template<class Producer > | |
void | stream_pushn_back (const Producer &prod, size_type nb) |
template<class Producer > | |
void | stream_pushn_front (const Producer &prod, size_type nb) |
template<class Producer > | |
void | stream_pushn (const Producer &prod, size_type nb) |
template<class Consumer , bool should_consume = true> | |
void | stream_popn_back (const Consumer &cons, size_type nb) |
template<class Consumer , bool should_consume = true> | |
void | stream_popn_front (const Consumer &cons, size_type nb) |
template<class Consumer , bool should_consume = true> | |
void | stream_popn (const Consumer &cons, size_type nb) |
void | concat (self_type &other) |
template<class Pred > | |
bool | split (const Pred &p, reference middle_item, self_type &other) |
template<class Pred > | |
void | split (const Pred &p, self_type &other) |
void | split (size_type i, self_type &other) |
void | split (iterator position, self_type &other) |
void | split_approximate (self_type &other) |
iterator | insert (iterator position, const value_type &val) |
void | clear () |
void | swap (self_type &other) |
Iterators | |
iterator | begin () const |
iterator | end () const |
template<class Body > | |
void | for_each (const Body &f) const |
template<class Body > | |
void | for_each (iterator beg, iterator end, const Body &f) const |
template<class Body > | |
void | for_each_segment (const Body &f) const |
template<class Body > | |
void | for_each_segment (iterator begin, iterator end, const Body &f) const |
Cached measurement | |
measured_type | get_cached () const |
measure_type | get_measure () const |
void | set_measure (measure_type meas) |
void | copy_measure_to (self_type &other) |
Debugging routines | |
template<class ItemPrinter > | |
void | print_chunk (const chunk_type &c) const |
template<class ItemPrinter , class CachePrinter = DummyCachePrinter> | |
void | print () const |
void | check_size () const |
void | check () const |
Public Attributes | |
friend | iterator |
Protected Types | |
using | chunk_type = typename Configuration::chunk_type |
using | chunk_search_type = typename Configuration::chunk_search_type |
using | chunk_cache_type = typename Configuration::chunk_cache_type |
using | chunk_measured_type = typename chunk_cache_type::measured_type |
using | chunk_algebra_type = typename chunk_cache_type::algebra_type |
using | chunk_measure_type = typename chunk_cache_type::measure_type |
using | chunk_pointer = chunk_type * |
using | middle_type = typename Configuration::middle_type |
using | middle_cache_type = typename Configuration::middle_cache_type |
using | middle_measured_type = typename middle_cache_type::measured_type |
using | middle_algebra_type = typename middle_cache_type::algebra_type |
using | middle_measure_type = typename middle_cache_type::measure_type |
using | size_access = typename Configuration::size_access |
using | const_self_pointer_type = const chunkedbagbase< Configuration > * |
using | const_chunk_pointer = const chunk_type * |
using | position_type = enum{found_back_outer, found_back_inner, found_middle, found_nowhere} |
Protected Member Functions | |
template<class Pred > | |
middle_measured_type | chunk_split (const Pred &p, middle_measured_type prefix, chunk_type &src, value_type &x, chunk_type &dst) |
bool | is_buffer (const chunk_type *c) const |
void | push_buffer_back (chunk_type &c) |
void | restore_back_outer_empty_iff_all_empty () |
void | restore_back_inner_full_or_empty () |
void | ensure_empty_back_inner () |
const_chunk_pointer | get_chunk_containing_last_item () const |
template<class Pred > | |
middle_measured_type | search (const Pred &p, middle_measured_type prefix, position_type &pos) const |
template<class Pred > | |
middle_measured_type | search_for_chunk (const Pred &p, middle_measured_type prefix, bool &found, const_chunk_pointer &cur) const |
template<class Pred > | |
middle_measured_type | split_aux (const Pred &p, middle_measured_type prefix, reference x, self_type &other) |
template<class Pred > | |
middle_measured_type | split_aux (const Pred &p, middle_measured_type prefix, self_type &other) |
void | init () |
Static Protected Member Functions | |
static chunk_pointer | chunk_alloc () |
static void | chunk_free (chunk_pointer c) |
Protected Attributes | |
chunk_type | back_outer |
chunk_type | back_inner |
std::unique_ptr< middle_type > | middle |
chunk_measure_type | chunk_meas |
middle_measure_type | middle_meas |
Static Protected Attributes | |
static constexpr int | chunk_capacity = Configuration::chunk_capacity |
Friends | |
void | extras::split_by_index (self_type &c, size_type i, self_type &other) |
Definition at line 48 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::algebra_type = typename cache_type::algebra_type |
Definition at line 101 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::allocator_type = typename config_type::item_allocator_type |
Definition at line 80 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::cache_type = chunk_cache_type |
Definition at line 99 of file chunkedbag.hpp.
|
protected |
Definition at line 55 of file chunkedbag.hpp.
|
protected |
Definition at line 53 of file chunkedbag.hpp.
|
protected |
Definition at line 56 of file chunkedbag.hpp.
|
protected |
Definition at line 54 of file chunkedbag.hpp.
|
protected |
Definition at line 57 of file chunkedbag.hpp.
|
protected |
Definition at line 52 of file chunkedbag.hpp.
|
protected |
Definition at line 51 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::config_type = Configuration |
Definition at line 76 of file chunkedbag.hpp.
|
protected |
Definition at line 186 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::const_pointer = const value_type* |
Definition at line 91 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::const_reference = const value_type& |
Definition at line 89 of file chunkedbag.hpp.
|
protected |
Definition at line 66 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::difference_type = typename config_type::difference_type |
Definition at line 79 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::iterator = Iterator<self_type, config_type> |
Definition at line 105 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::measure_type = typename cache_type::measure_type |
Definition at line 102 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::measured_type = typename cache_type::measured_type |
Definition at line 100 of file chunkedbag.hpp.
|
protected |
Definition at line 62 of file chunkedbag.hpp.
|
protected |
Definition at line 60 of file chunkedbag.hpp.
|
protected |
Definition at line 63 of file chunkedbag.hpp.
|
protected |
Definition at line 61 of file chunkedbag.hpp.
|
protected |
Definition at line 59 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::pointer = value_type* |
Definition at line 90 of file chunkedbag.hpp.
|
protected |
Definition at line 203 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::reference = value_type& |
Definition at line 88 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::segment_type = typename config_type::segment_type |
Definition at line 92 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::self_type = chunkedbagbase<config_type> |
Definition at line 77 of file chunkedbag.hpp.
|
protected |
Definition at line 64 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::size_type = typename config_type::size_type |
Definition at line 78 of file chunkedbag.hpp.
using pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::value_type = typename config_type::value_type |
Definition at line 87 of file chunkedbag.hpp.
|
inline |
Definition at line 331 of file chunkedbag.hpp.
|
inline |
Definition at line 335 of file chunkedbag.hpp.
|
inline |
Definition at line 340 of file chunkedbag.hpp.
|
inline |
Definition at line 349 of file chunkedbag.hpp.
|
inline |
Definition at line 381 of file chunkedbag.hpp.
|
inline |
Definition at line 393 of file chunkedbag.hpp.
|
inline |
Definition at line 647 of file chunkedbag.hpp.
|
inline |
Definition at line 764 of file chunkedbag.hpp.
|
inline |
Definition at line 748 of file chunkedbag.hpp.
|
inlinestaticprotected |
Definition at line 120 of file chunkedbag.hpp.
|
inlinestaticprotected |
Definition at line 125 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 131 of file chunkedbag.hpp.
|
inline |
Definition at line 626 of file chunkedbag.hpp.
|
inline |
Definition at line 558 of file chunkedbag.hpp.
|
inline |
Definition at line 708 of file chunkedbag.hpp.
|
inline |
Definition at line 362 of file chunkedbag.hpp.
|
inline |
Definition at line 651 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 178 of file chunkedbag.hpp.
|
inline |
Definition at line 656 of file chunkedbag.hpp.
|
inline |
Definition at line 665 of file chunkedbag.hpp.
|
inline |
Definition at line 670 of file chunkedbag.hpp.
|
inline |
Definition at line 679 of file chunkedbag.hpp.
|
inline |
Definition at line 385 of file chunkedbag.hpp.
|
inline |
Definition at line 397 of file chunkedbag.hpp.
|
inline |
Definition at line 690 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 188 of file chunkedbag.hpp.
|
inline |
Definition at line 699 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 320 of file chunkedbag.hpp.
|
inline |
Definition at line 622 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 139 of file chunkedbag.hpp.
|
inline |
Definition at line 411 of file chunkedbag.hpp.
|
inline |
Definition at line 455 of file chunkedbag.hpp.
|
inline |
Definition at line 444 of file chunkedbag.hpp.
|
inline |
Definition at line 451 of file chunkedbag.hpp.
|
inline |
Definition at line 476 of file chunkedbag.hpp.
|
inline |
Definition at line 493 of file chunkedbag.hpp.
|
inline |
Definition at line 480 of file chunkedbag.hpp.
|
inline |
Definition at line 485 of file chunkedbag.hpp.
|
inline |
Definition at line 471 of file chunkedbag.hpp.
|
inline |
Definition at line 489 of file chunkedbag.hpp.
|
inline |
Definition at line 734 of file chunkedbag.hpp.
|
inline |
Definition at line 721 of file chunkedbag.hpp.
|
inline |
Definition at line 440 of file chunkedbag.hpp.
|
inline |
Definition at line 426 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 145 of file chunkedbag.hpp.
|
inline |
Definition at line 436 of file chunkedbag.hpp.
|
inline |
Definition at line 467 of file chunkedbag.hpp.
|
inline |
Definition at line 459 of file chunkedbag.hpp.
|
inline |
Definition at line 463 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 168 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 153 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 206 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 241 of file chunkedbag.hpp.
|
inline |
Definition at line 703 of file chunkedbag.hpp.
|
inline |
Definition at line 366 of file chunkedbag.hpp.
|
inline |
Definition at line 576 of file chunkedbag.hpp.
|
inline |
Definition at line 588 of file chunkedbag.hpp.
|
inline |
Definition at line 603 of file chunkedbag.hpp.
|
inline |
Definition at line 614 of file chunkedbag.hpp.
|
inline |
Definition at line 618 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 274 of file chunkedbag.hpp.
|
inlineprotected |
Definition at line 311 of file chunkedbag.hpp.
|
inline |
Definition at line 402 of file chunkedbag.hpp.
|
inline |
Definition at line 407 of file chunkedbag.hpp.
|
inline |
Definition at line 553 of file chunkedbag.hpp.
|
inline |
Definition at line 533 of file chunkedbag.hpp.
|
inline |
Definition at line 548 of file chunkedbag.hpp.
|
inline |
Definition at line 528 of file chunkedbag.hpp.
|
inline |
Definition at line 498 of file chunkedbag.hpp.
|
inline |
Definition at line 523 of file chunkedbag.hpp.
|
inline |
Definition at line 630 of file chunkedbag.hpp.
|
inline |
Definition at line 389 of file chunkedbag.hpp.
|
friend |
|
protected |
Definition at line 112 of file chunkedbag.hpp.
|
protected |
Definition at line 111 of file chunkedbag.hpp.
|
staticprotected |
Definition at line 68 of file chunkedbag.hpp.
|
protected |
Definition at line 115 of file chunkedbag.hpp.
friend pasl::data::chunkedseq::chunkedbagbase< Configuration, Iterator >::iterator |
Definition at line 106 of file chunkedbag.hpp.
|
protected |
Definition at line 113 of file chunkedbag.hpp.
|
protected |
Definition at line 116 of file chunkedbag.hpp.