Graph n e is a type of directed graphs with nodes in n and
edges in e.
At most one edge is allowed between any two nodes. Multigraphs
can be simulated by letting the edge type e be a collection
type.
The graphs are represented as adjacency maps (adjacency lists, but using finite maps instead of arrays and lists). This makes it possible to compute a node's outgoing edges in logarithmic time (O(log n)). However, computing the incoming edges may be more expensive.
Note that neither the number of nodes nor the number of edges may
exceed maxBound :: Int.
Instances9SetToInfty, Functor, Eq, Show, Pretty, PrettyTCM, …
(Ord r, Ord f) => SetToInfty f (ConGraph r f)Defined in Agda-2.7.0.1 · Agda.TypeChecking.SizedTypes.WarshallSolverFunctor (Graph n)Defined in Agda-2.7.0.1 · Agda.Utils.Graph.AdjacencyMap.Unidirectional(Eq n, Eq e) => Eq (Graph n e)Defined in Agda-2.7.0.1 · Agda.Utils.Graph.AdjacencyMap.Unidirectional(Ord n, Show n, Show e) => Show (Graph n e)Defined in Agda-2.7.0.1 · Agda.Utils.Graph.AdjacencyMap.Unidirectional(Ord n, Pretty n, Pretty e) => Pretty (Graph n e)Defined in Agda-2.7.0.1 · Agda.Utils.Graph.AdjacencyMap.Unidirectional(PrettyTCM n, PrettyTCMWithNode e) => PrettyTCM (Graph n e)Defined in Agda-2.7.0.1 · Agda.TypeChecking.Pretty(Monoid a, CombineNewOld a, Ord n) => CombineNewOld (Graph n a)Defined in Agda-2.7.0.1 · Agda.Termination.CallGraph(Ord r, Ord f, Negative a) => Negative (Graph r f a)Defined in Agda-2.7.0.1 · Agda.TypeChecking.SizedTypes.WarshallSolverA graph is negative if it contains a negative loop (diagonal edge). Makes sense on transitive graphs.
(Ord r, Ord f, Negative a) => Negative (Graphs r f a)Defined in Agda-2.7.0.1 · Agda.TypeChecking.SizedTypes.WarshallSolver