When creating a new mutable graph via typescript, you must specify the type
of the node data and link data you intend on using, since these types are
invariant for mutable graphs.
// create a new graph constgrf = graph<string, number>(); // add two nodes with some data consta = grf.node("a"); constb = grf.node("b"); // add a new link with the data `1` constlink = grf.link(a, b, 1); grf.connected(); // true
Example
If undefined extends the data types then they can be omitted:
create a new mutable empty MutGraph
When creating a new mutable graph via typescript, you must specify the type of the node data and link data you intend on using, since these types are invariant for mutable graphs.