pathfinding- pathfinding in grid and graphs

Safe HaskellSafe-Inferred



class PathFinding carte where Source

Minimal complete definition

neighbors, locate, mkqueue, enqueue, dequeue

Associated Types

type Queue carte Source

type Pos carte Source

type Neighbor carte Source

function to find neighboors from pos in carte


neighbors :: carte -> Pos carte -> [Neighbor carte] Source

locate :: carte -> Neighbor carte -> Pos carte Source

queue manipulation to allow user-defined queues and specific optimizations

mkqueue :: Proxy carte -> [Pos carte] -> Queue carte Source

enqueue :: Proxy carte -> [Neighbor carte] -> Queue carte -> Queue carte Source

dequeue :: Proxy carte -> Queue carte -> Maybe (Neighbor carte, Queue carte) Source

type-inference helper function

proxify :: carte -> Proxy carte Source