class Graph { edges: Map<string, E>; directed: boolean; sort(compareFn?: (edgeA: E, edgeB: E) => number): any; addEdge(...e: E[]): E[]; addVertex(...v: V[]): V[]; deleteVertex(...v: V[]): V[]; getVertex(v: string | V): V; getEdge(...args: [u: string | V, v: string | V] | [e: string | E]): E; deleteEdge(...e: E[]): E[]; getEdgeNeighbors(v: string | V): E[]; [Symbol.iterator](): IterableIterator<E>; static create(edges: { [key: string]: string[]; }): Graph<Vertex, Edge<Vertex>>;}
Members
edges
Map<string, E>
directed
boolean
sort
any
@paramcompareFn
(edgeA: E, edgeB: E) => number
@returns
any
addEdge
E[]
@parame
E[]
@returns
E[]
addVertex
V[]
@paramv
V[]
@returns
V[]
deleteVertex
V[]
@paramv
V[]
@returns
V[]
@paramv
string | V
@returns
V
@paramargs
[u: string | V, v: string | V] | [e: string | E]
@returns
E
deleteEdge
E[]
@parame
E[]
@returns
E[]
@paramv
string | V
@returns
E[]
[Symbol.iterator]
IterableIterator<E>
@returns
IterableIterator<E>
create
Graph<Vertex, Edge<Vertex>>
@complexity
O(n)
@paramedges
{ [key: string]: string[]; }
@returns
Graph<Vertex, Edge<Vertex>>