Std.Graph
22 public declarations
- addEdge
&Std.Graph.Graph[N] -> N -> N -> Std.Graph.Graph[N] where N: OrdThe graph with an edge from one node to another.
- addNode
&Std.Graph.Graph[N] -> N -> Std.Graph.Graph[N] where N: OrdThe graph with a node in it, whether or not it has any edges.
- components
&Std.Graph.Graph[N] -> Array[Array[N]] where N: OrdThe groups of nodes joined to each other when direction is ignored.
- empty
Std.Graph.Graph[N] where N: OrdA graph with nothing in it.
- fromEdges
&Array[(N, N)] -> Std.Graph.Graph[N] where N: OrdA graph built from a list of edges.
- Graph
A directed graph: nodes, and the edges leading out of each one.
- hasCycle
&Std.Graph.Graph[N] -> Bool where N: OrdWhether following edges can lead back to where it started.
- hasEdge
&Std.Graph.Graph[N] -> N -> N -> Bool where N: OrdWhether there is an edge from one node to another.
- hasNode
&Std.Graph.Graph[N] -> N -> Bool where N: OrdWhether the node is in the graph.
- inDegree
&Std.Graph.Graph[N] -> N -> Int where N: OrdHow many edges lead into a node.
- leaves
&Std.Graph.Graph[N] -> Array[N] where N: OrdThe nodes that point at nothing.
- neighbours
&Std.Graph.Graph[N] -> N -> Array[N] where N: OrdThe nodes an edge leads to from here.
- nodes
&Std.Graph.Graph[N] -> Array[N] where N: OrdEvery node.
- order
&Std.Graph.Graph[N] -> Int where N: OrdHow many nodes there are.
- outDegree
&Std.Graph.Graph[N] -> N -> Int where N: OrdHow many edges lead out of a node.
- reachableFrom
&Std.Graph.Graph[N] -> N -> Array[N] where N: OrdEvery node reachable from a starting node, nearest first.
- reaches
&Std.Graph.Graph[N] -> N -> N -> Bool where N: OrdWhether one node can be reached from another by following edges.
- reversed
&Std.Graph.Graph[N] -> Std.Graph.Graph[N] where N: OrdThe graph with every edge turned around.
- roots
&Std.Graph.Graph[N] -> Array[N] where N: OrdThe nodes that nothing points at, which is where a topological walk begins.
- shortestPath
&Std.Graph.Graph[N] -> N -> N -> Option[Array[N]] where N: OrdThe shortest path from one node to another counted in edges, or `None` when
- stronglyConnected
&Std.Graph.Graph[N] -> Array[Array[N]] where N: OrdThe groups of nodes that can all reach each other.
- topologicalOrder
&Std.Graph.Graph[N] -> Option[Array[N]] where N: OrdThe nodes in an order where every node comes before the ones it points at,
