Returns (<L>(edges) => {
getVertex: ((vertex) => [label: L, from: K, to: readonly K[]]);
graph: Graph;
indexVertex: ((key) => Option<Vertex>);
})
The new graph, function to get a corresponding vertex, and function to index a vertex by a key.
- <L>(edges): {
getVertex: ((vertex) => [label: L, from: K, to: readonly K[]]);
graph: Graph;
indexVertex: ((key) => Option<Vertex>);
} Parameters
edges: readonly [label: L, from: K, to: (readonly K[])][]
Returns {
getVertex: ((vertex) => [label: L, from: K, to: readonly K[]]);
graph: Graph;
indexVertex: ((key) => Option<Vertex>);
}
getVertex: ((vertex) => [label: L, from: K, to: readonly K[]])
- (vertex): [label: L, from: K, to: readonly K[]]
Returns [label: L, from: K, to: readonly K[]]
indexVertex: ((key) => Option<Vertex>)
Builds a new
Graph
with the total order and edges with its label.