impure-containers-0.1.1: Initial project template from stack

Safe HaskellNone
LanguageHaskell2010

Data.Graph.Immutable.Tagged

Synopsis

Documentation

newtype Vertex g Source

Constructors

Vertex 

Fields

getVertex :: Int
 

newtype Vertices g v Source

Constructors

Vertices 

Fields

getVertices :: Vector v
 

Instances

data Edge g Source

Constructors

Edge 

Fields

edgeVertexA :: !Int
 
edgeVertexB :: !Int
 

data Graph g e v Source

The neighbor vertices and neighbor edges must have equal length.

Instances

breadthFirstBy :: (Ord s, Monoid s) => (v -> v -> s -> e -> s) -> Vertex g -> Graph g e v -> Vertices g s Source

This is a generalization of Dijkstra's algorithm.

lookupVertex :: Eq v => v -> Graph g e v -> Maybe (Vertex g) Source

traverseNeighbors_ :: Applicative m => (e -> Vertex g -> v -> m a) -> Vertex g -> Graph g e v -> m () Source

mutableIForM_ :: PrimMonad m => MVector (PrimState m) a -> (Int -> a -> m b) -> m () Source

mutableIFoldM' :: PrimMonad m => (a -> Int -> b -> m a) -> a -> MVector (PrimState m) b -> m a Source