mir.series

Index-series

The module contains Series data structure with special iteration and indexing methods. It is aimed to construct index or time-series using Mir and Phobos algorithms.

More...

Public Imports

mir.ndslice.slice
public import mir.ndslice.slice;
mir.ndslice.sorting
public import mir.ndslice.sorting : sort;

Members

Aliases

Observation
alias Observation = mir_observation

Plain index/time observation data structure. Observation are used as return tuple for for indexing Series.

Series
alias Series = mir_series

Plain index series data structure.

SeriesMap
alias SeriesMap(K, V) = mir_series!(K*, V*)

Convinient alias for 1D Contiguous Series.

Enums

isSeries
eponymoustemplate isSeries(U)

Functions

assocArray
auto assocArray(Series!(IndexIterator, Iterator, N, kind) series)

Returns a newly allocated associative array from a range of key/value tuples.

find
size_t find(Series!(IndexIterator, Iterator, N, kind) series, Index key)

Finds a backward index such that series.index[$ - backward_index] == key.

findIndex
size_t findIndex(Series!(IndexIterator, Iterator, N, kind) series, Index key)

Finds an index such that series.index[index] == key.

insert
V[K] insert(V[K] aa, Series!(IndexIterator, Iterator, N, kind) series)

Inserts a series to the associative array aa.

insertOrAssign
V[K] insertOrAssign(V[K] aa, Series!(IndexIterator, Iterator, N, kind) series)

Inserts or assigns a series to the associative array aa.

makeSeries
Series!(K*, V*) makeSeries(Allocator allocator, V[K] aa)
Series!(K*, V*) makeSeries(Allocator allocator, V[K]* aa)

Constructs a manually allocated series from an associative array. Performs exactly two allocations.

makeUnionSeries
auto makeUnionSeries(Allocator allocator, Series!(IndexIterator, Iterator, N, kind)[C] seriesTuple)

Merges multiple (time) series into one.

observation
auto observation(Index index, Data data)

Convenient function for Observation construction.

rcUnionSeries
auto rcUnionSeries(Series!(IndexIterator, Iterator, N, kind)[C] seriesTuple)

Merges multiple (time) series into one.

rcseries
auto rcseries(RV[RK] aa)
auto rcseries(V[K] aa)
auto rcseries(V[K]* aa)

Constructs a RC-allocated series from an associative array. Performs exactly two allocations.

series
auto series(Slice!IndexIterator index, Slice!(Iterator, N, kind) data)
auto series(Index[] index, Data[] data)
auto series(Slice!IndexIterator index, Data[] data)
auto series(Index[] index, Slice!(Iterator, N, kind) data)

Convenient function for Series construction.

series
Series!(K*, V*) series(RV[RK] aa)
Series!(RK*, RV*) series(V[K] aa)
auto series(V[K]* aa)

Constructs a GC-allocated series from an associative array. Performs exactly two allocations.

troykaLength
size_t troykaLength(Series!(IndexIterL, IterL, LN, lkind) lhs, Series!(IndexIterR, IterR, RN, rkind) rhs)
size_t troykaLength(LeftRange lhs, RightRange rhs)

Length for Troyka union handlers.

unionSeries
auto unionSeries(Series!(IndexIterator, Iterator, N, kind)[C] seriesTuple)

Merges multiple (time) series into one. Makes exactly one memory allocation for two series union and two memory allocation for three and more series union.

unionSeriesImpl
auto unionSeriesImpl(Series!(IndexIterator, Iterator, N, kind)[] seriesTuple, Series!(UI*, UE*, N) uninitSeries)

Initialize preallocated series using union of multiple (time) series. Doesn't make any allocations.

Structs

mir_observation
struct mir_observation(Index, Data)

Plain index/time observation data structure. Observation are used as return tuple for for indexing Series.

mir_series
struct mir_series(IndexIterator_, Iterator_, size_t N_ = 1, SliceKind kind_ = Contiguous)

Plain index series data structure.

Templates

rcTroykaSeries
template rcTroykaSeries(alias lfun, alias cfun, alias rfun)

Constructs union using three functions to handle each intersection case separately.

troykaGalop
template troykaGalop(alias lfun, alias cfun, alias rfun)

Iterates union using three functions to handle each intersection case separately.

troykaSeries
template troykaSeries(alias lfun, alias cfun, alias rfun)

Constructs union using three functions to handle each intersection case separately.

troykaSeriesImpl
template troykaSeriesImpl(alias lfun, alias cfun, alias rfun)

Detailed Description

Public imports

mir.ndslice.slice.

Meta

Authors

Ilya Yaroshenko