ConcurrentUtils-0.4.5.0: Concurrent utilities

Safe HaskellSafe
LanguageHaskell98

Data.BellmanFord

Synopsis

Documentation

keys :: [(a, b)] -> [a] Source #

mapWithKey :: (t -> u -> v) -> Array Int (t, u) -> Array Int (t, v) Source #

relaxEdge :: (Eq t, Eq a1, Fractional b, Ord b) => Array i (a1, (a, b)) -> [((a1, t), b)] -> t -> (a1, b) -> (a1, b) Source #

Edge relaxation.

bellmanFord :: Eq a => [((a, a), Double)] -> a -> [(a, (a, Double))] Source #

The Bellman-Ford shortest path algorithm.

retrievePath :: Eq a => [(a, (a, Double))] -> a -> a -> [a] Source #

cycles :: Eq a => [((a, a), ())] -> a -> Maybe a Source #

Cycle finding