Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Concept OrderedInserter

OrderedInserter

Description

An OrderedInserter is a mechanism for efficiently populating a RangeRunStorage. Values and runs are pushed into it in order, and when the OrderedInserter is committed, the data is written into the underlying RangeRunStorage.

Associated types

  • value_type

    RangeRunStorage<S>::value_type

    The value type of the underlying RangeRunStorage.

  • run_type

    RangeRunStorage<S>::run_type

    The run type of the underlying RangeRunStorage.

Notation

O
A type playing the role of ordered-inserter-type in the OrderedInserter concept.
S
A type playing the role of range-run-storage-type in the OrderedInserter concept.
o
Object of type O
r
Object of type run_type
v
Object of type value_type

Valid expressions

Name Expression Type Semantics

SetAt

boost::range_run_storage::set_at(o, r, v)

void

Adds a run r with value v. This operation is amortized O(1). The offset of the run r must be greater than or equal to the end-offset of any run added previously.

Commit

boost::range_run_storage::commit(o)

void

Writes all the runs and values into the underlying series. The complexity is O(N) in the worst case.

Models

  • boost::time_series::ordered_inserter<boost::time_series::dense_series<double> >

PrevUpHomeNext