chunkedseq
container library for large in-memory data sets
|
The deque structure implements a fast doubly ended queue that supports logarithmic-time operations for both weighted split and concatenation.
The deque interface has much of the interface of the STL deque. All operations for accessing the front and back of the container (e.g., front
, push_front
, pop_front
, etc.) are supported. In addition, the deque supports splitting and concatenation in logarithmic time and provides a random-access iterator.
Like the STL deque, the following deque constructor takes template parameters for the Item
and Item_alloc
types. The constructor takes three additional template parameters:
Chunk_capacity
specifies the maximum number of items that can fit in each chunk. Although each chunk can store at most Chunk_capacity
items, the container can only guarantee that at most half of the cells of any given chunk are filled.Cache
type specifies the strategy to be used internally by the deque to maintain monoid-cached measurements of groups of items (see Customized data structures by cached measurement).Chunk_struct
type specifies the fixed-capacity ring-buffer representation to be used for storing items (see Fixed-capacity vectors).mydeque contains: 4 9 3 8 2 7 1 6 0 5
Just after split: contents of mydeque: 0 1 8888 contents of mydeque2: 9999 4 5 Just after merge: contents of mydeque: 0 1 8888 9999 4 5 contents of mydeque2: