The OpenD Programming Language

series

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

Parameters

aa RV[RK]

associative array or a pointer to associative array

Return Value

Type: Series!(K*, V*)

sorted GC-allocated series.

Examples

auto s = [1: 1.5, 3: 3.3, 2: 20.9].series;
assert(s.index == [1, 2, 3]);
assert(s.data == [1.5, 20.9, 3.3]);
assert(s.data[s.findIndex(2)] == 20.9);

See Also

Meta