Undirected and directed graphs and associated algorithms.
import { Graphs } from "https://unpkg.com/@ixfx/collections/bundle"const Dg = Graphs.Directed;let g = Dg.graph();g = Dg.connect(g, { from: `a`, to: `b` });g = Dg.connect(g, { from: `b`, to: `c` });g = Dg.connect(g, { from: `c`, to: `a` });Dg.dumpGraph(g);// A -> B, B -> C, C -> A Copy
import { Graphs } from "https://unpkg.com/@ixfx/collections/bundle"const Dg = Graphs.Directed;let g = Dg.graph();g = Dg.connect(g, { from: `a`, to: `b` });g = Dg.connect(g, { from: `b`, to: `c` });g = Dg.connect(g, { from: `c`, to: `a` });Dg.dumpGraph(g);// A -> B, B -> C, C -> A
Directed graphs
Undirected graphs
Undirected and directed graphs and associated algorithms.
Example