Interface GetEdge<V, E>

Describes how to interact with an arbitrary edge type.

Your graph's edges can be any format, as long as you supply the appropriate accessors.

type Vertex = object
type Edge1 = {from: Vertex, to: Vertex}
const getEdge1 = {from: (e: Edge1) => e.from, to: (e: Edge1) => e.to}

type Edge2 = {parent: Vertex, child: Vertex}
const getEdge2 = {from: (e: Edge1) => e.parent, to: (e: Edge1) => e.child}
interface GetEdge<V, E> {
    from: ((edge) => V);
    to: ((edge) => V);
}

Type Parameters

  • V

  • E

Properties

Properties

from: ((edge) => V)

Type declaration

    • (edge): V
    • Parameters

      • edge: E

      Returns V

to: ((edge) => V)

Type declaration

    • (edge): V
    • Parameters

      • edge: E

      Returns V

Generated using TypeDoc