= associative array or a pointer to associative array
sorted manually allocated series.
import std.experimental.allocator; import std.experimental.allocator.building_blocks.region; InSituRegion!(1024) allocator; auto aa = [1: 1.5, 3: 3.3, 2: 2.9]; auto s = (double[int] aa) @nogc @trusted pure nothrow { return allocator.makeSeries(aa); }(aa); auto indexArray = s.index.field; auto dataArray = s.data.field; assert(s.index == [1, 2, 3]); assert(s.data == [1.5, 2.9, 3.3]); assert(s.data[s.findIndex(2)] == 2.9); allocator.dispose(indexArray); allocator.dispose(dataArray);
Constructs a manually allocated series from an associative array. Performs exactly two allocations.