Graph
Graphs in ixfx are immutable, any changes to the graph produce a new graph.
Each node, or vertex of the graph has an associated string key. Thus, it’s not possible to put data directly into the these graphs. Rather, you put in a key that can later identify the data. This is helpful if the data you are storing is likewise immutable, since otherwise the graph would be storing stale references. The principle being that the key can always point back to the right object, even if its identity has changed.
Directed graph
Graphs.Directed is set of functions for working with directed graphs. A directed graph means that connections have ‘from’ and ‘to’, like an arrow drawn between two shapes.
The graph is made up of nodes or vertices (Vertex ), connected via edges (Edge ).
Each vertex keeps track of its outgoing edges.
Undirected graph
Graphs.Undirected is a set of functions for working with undirected graphs.
Undirected graphs have no sense of ‘from’ or ‘to’. Vertices are connected, but with no sense of direction.
Type Undirected.Edge can have a weight.