• Builds a new Graph with the total order and edges with its label.

    Type Parameters

    • K

    Parameters

    • order: Ord<K, K>

      A total order of key type K.

    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>);
        }
      • Type Parameters

        • L

        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[]]
            • Parameters

              Returns [label: L, from: K, to: readonly K[]]

        • graph: Graph
        • indexVertex: ((key) => Option<Vertex>)

Generated using TypeDoc