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

Safe Haskell | Safe-Infered

Agda.Utils.Graph

# Documentation

newtype Graph n e

Constructors

Graph |
Fields unGraph :: Map n (Map n e)

Instances

Functor (Graph n) |
(Eq n, Eq e) => Eq (Graph 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 :: (Eq e, 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]