Data.Graph.Analysis.Algorithms.Directed
 Maintainer Ivan.Miljenovic@gmail.com
 Contents Ending nodes Root nodes Leaf nodes Singleton nodes Subgraphs
Description
Defines algorithms that work on both directed graphs.
Synopsis
 endNode :: Graph g => (g a b -> Node -> NGroup) -> g a b -> LNode a -> Bool endNode' :: Graph g => (g a b -> Node -> NGroup) -> g a b -> Node -> Bool endBy :: Graph g => (g a b -> Node -> NGroup) -> g a b -> LNGroup a endBy' :: Graph g => (g a b -> Node -> NGroup) -> g a b -> NGroup rootsOf :: Graph g => g a b -> LNGroup a rootsOf' :: Graph g => g a b -> NGroup isRoot :: Graph g => g a b -> LNode a -> Bool isRoot' :: Graph g => g a b -> Node -> Bool leavesOf :: Graph g => g a b -> LNGroup a leavesOf' :: Graph g => g a b -> NGroup isLeaf :: Graph g => g a b -> LNode a -> Bool isLeaf' :: Graph g => g a b -> Node -> Bool singletonsOf :: Graph g => g a b -> LNGroup a singletonsOf' :: Graph g => g a b -> NGroup isSingleton :: Graph g => g a b -> LNode a -> Bool isSingleton' :: Graph g => g a b -> Node -> Bool coreOf :: (DynGraph g, Eq a, Eq b) => g a b -> g a b
Ending nodes

Find starting/ending nodes.

We define an ending node as one where, given a function:

```     f :: (Graph g) => g a b -> Node -> [Node]
```

the only allowed result is that node itself (to allow for loops).

 endNode :: Graph g => (g a b -> Node -> NGroup) -> g a b -> LNode a -> Bool Source
Determine if this LNode is an ending node.
 endNode' :: Graph g => (g a b -> Node -> NGroup) -> g a b -> Node -> Bool Source
Determine if this Node is an ending node.
 endBy :: Graph g => (g a b -> Node -> NGroup) -> g a b -> LNGroup a Source
Find all LNodes that meet the ending criteria.
 endBy' :: Graph g => (g a b -> Node -> NGroup) -> g a b -> NGroup Source
Find all Nodes that match the ending criteria.
Root nodes
 rootsOf :: Graph g => g a b -> LNGroup a Source
Find all roots of the graph.
 rootsOf' :: Graph g => g a b -> NGroup Source
Find all roots of the graph.
 isRoot :: Graph g => g a b -> LNode a -> Bool Source
Returns True if this LNode is a root.
 isRoot' :: Graph g => g a b -> Node -> Bool Source
Returns True if this Node is a root.
Leaf nodes
 leavesOf :: Graph g => g a b -> LNGroup a Source
Find all leaves of the graph.
 leavesOf' :: Graph g => g a b -> NGroup Source
Find all leaves of the graph.
 isLeaf :: Graph g => g a b -> LNode a -> Bool Source
Returns True if this LNode is a leaf.
 isLeaf' :: Graph g => g a b -> Node -> Bool Source
Returns True if this Node is a leaf.
Singleton nodes
 singletonsOf :: Graph g => g a b -> LNGroup a Source
Find all singletons of the graph.
 singletonsOf' :: Graph g => g a b -> NGroup Source
Find all singletons of the graph.
 isSingleton :: Graph g => g a b -> LNode a -> Bool Source
Returns True if this LNode is a singleton.
 isSingleton' :: Graph g => g a b -> Node -> Bool Source
Returns True if this Node is a singleton.
Subgraphs
 coreOf :: (DynGraph g, Eq a, Eq b) => g a b -> g a b Source
The core of the graph is the part of the graph containing all the cycles, etc. Depending on the context, it could be interpreted as the part of the graph where all the work is done.