- connectTo(graph, from, to, weight?): {
edge: Collections.Graphs.Directed.Edge;
graph: DirectedGraph;
} Parameters
- graph: Readonly<{
vertices: IMapImmutable<string, Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>>;
}> - from: string
- to: string
Optional
weight: number
Make a connection between two vertices with a given weight. It returns the new graph as wll as the created edge.