Agda-2.2.10: A dependently typed functional programming language and proof assistant

Agda.Utils.Graph

# Documentation

newtype Graph n e

Constructors

Graph |

Fields

unGraph :: Map n (Map n e)

edges :: Ord n => Graph n e -> [(n, n, e)]

nodes :: Ord n => Graph n e -> Set n

fromList :: (SemiRing e, Ord n) => [(n, n, e)] -> Graph n e

empty :: Graph n e

singleton :: n -> n -> e -> Graph n e

insert :: (SemiRing e, Ord n) => n -> n -> e -> Graph n e -> Graph n e

union :: (SemiRing e, Ord n) => Graph n e -> Graph n e -> Graph n e

unions :: (SemiRing e, Ord n) => [Graph n e] -> Graph n e

lookup :: Ord n => n -> n -> Graph n e -> Maybe e

neighbours :: Ord n => n -> Graph n e -> [(n, e)]

growGraph :: (SemiRing e, Ord n) => Graph n e -> Graph n e

transitiveClosure :: (SemiRing e, Ord n) => Graph n e -> Graph n e

findPath :: (SemiRing e, Ord n) => (e -> Bool) -> n -> n -> Graph n e -> Maybe e

allPaths :: (SemiRing e, Ord n, Ord c) => (e -> c) -> n -> n -> Graph n e -> [e]