The OpenD Programming Language

rcgraph

RCGraph!(I, J)
rcgraph
(
I = uint
J = size_t
KeyIterator
RangeIterator
)
(
Series!(KeyIterator, RangeIterator) graph
)

Parameters

graph Series!(KeyIterator, RangeIterator)

graph that is represented a series

Return Value

Type: RCGraph!(I, J)

A graph as an arrays of indeces Complexity: O(log(V) (V + E))

Examples

import mir.series: series;

static immutable keys = ["a", "b", "c"];
static immutable data = [
    ["b", "c"],
    ["a"],
    ["b"],
];

static immutable graphValue = [
    [1, 2], // a
    [0],    // b
    [1],    // c
];

assert (series(keys, data).rcgraph == graphValue);

Meta