- disconnect(graph, from, to): DirectedGraph
Parameters
- graph: Readonly<{
vertices: IMapImmutable<string, Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>>;
}> - from: string | Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}> - to: string | Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>
Returns a mutation of
graph
, with a given edge removed.If edge was not there, original graph is returned.