-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | pathfinding in grid and graphs -- @package pathfinding @version 0.1.0.0 module PathFinding.Class class PathFinding carte where type family Queue carte type family Pos carte type family Neighbor carte proxify _ = Proxy neighbors :: PathFinding carte => carte -> Pos carte -> [Neighbor carte] locate :: PathFinding carte => carte -> Neighbor carte -> Pos carte mkqueue :: PathFinding carte => Proxy carte -> [Pos carte] -> Queue carte enqueue :: PathFinding carte => Proxy carte -> [Neighbor carte] -> Queue carte -> Queue carte dequeue :: PathFinding carte => Proxy carte -> Queue carte -> Maybe (Neighbor carte, Queue carte) proxify :: PathFinding carte => carte -> Proxy carte module PathFinding.Grid data Grid cell Grid :: [[cell]] -> ([[cell]] -> (Int, Int) -> [(Int, Int)]) -> Grid cell _carte :: Grid cell -> [[cell]] _neighbor :: Grid cell -> [[cell]] -> (Int, Int) -> [(Int, Int)] gridNeighbors4 :: (a -> Bool) -> [[a]] -> (Width, Height) -> [(Width, Height)] gridNeighbors8 :: (a -> Bool) -> [[a]] -> (Width, Height) -> [(Width, Height)] gridNeighbors :: ((t, t1) -> [(Width, Height)]) -> (a -> Bool) -> [[a]] -> (t, t1) -> [(Width, Height)] type Width = Int type Height = Int labSize :: [[cell]] -> (Width, Height) instance PathFinding (Grid cell) module PathFinding.Graph type NodeID = Int data Graph distanceUnit Grid :: Map NodeID [(NodeID, distanceUnit)] -> Graph distanceUnit _nodes :: Graph distanceUnit -> Map NodeID [(NodeID, distanceUnit)] instance PathFinding (Graph u) module PathFinding.Algorithm findPath :: (PathFinding carte, pos ~ Pos carte, Ord pos) => pos -> pos -> carte -> [pos] module Example.Grid1 grid1 :: Grid Char module Example.Grid2 grid2 :: Grid Char module Example.Graph1 graph1 :: Graph Double