impure-containers-0.4.3: Mutable containers in haskell

Safe HaskellNone
LanguageHaskell2010

Data.Graph.Types

Synopsis

Documentation

data SomeGraph e v Source #

This is a Graph without the phantom type variable. Very few functions work with this type.

Instances

Functor (SomeGraph e) Source # 

Methods

fmap :: (a -> b) -> SomeGraph e a -> SomeGraph e b #

(<$) :: a -> SomeGraph e b -> SomeGraph e a #

(Eq e, Eq v) => Eq (SomeGraph e v) Source # 

Methods

(==) :: SomeGraph e v -> SomeGraph e v -> Bool #

(/=) :: SomeGraph e v -> SomeGraph e v -> Bool #

(Ord e, Ord v) => Ord (SomeGraph e v) Source # 

Methods

compare :: SomeGraph e v -> SomeGraph e v -> Ordering #

(<) :: SomeGraph e v -> SomeGraph e v -> Bool #

(<=) :: SomeGraph e v -> SomeGraph e v -> Bool #

(>) :: SomeGraph e v -> SomeGraph e v -> Bool #

(>=) :: SomeGraph e v -> SomeGraph e v -> Bool #

max :: SomeGraph e v -> SomeGraph e v -> SomeGraph e v #

min :: SomeGraph e v -> SomeGraph e v -> SomeGraph e v #

data Graph g e v Source #

A Graph with edges labeled by e and vertices labeled by v. The g type variable is a phatom type that associates a Graph with vertices that belong to it.

Instances

Functor (Graph g e) Source # 

Methods

fmap :: (a -> b) -> Graph g e a -> Graph g e b #

(<$) :: a -> Graph g e b -> Graph g e a #

data Vertex g Source #

A reference to a vertex in a Graph with matching type variable g. Vertex is a thin wrapper for Int and does not hold the label of the vertex.

Instances

Eq (Vertex g) Source # 

Methods

(==) :: Vertex g -> Vertex g -> Bool #

(/=) :: Vertex g -> Vertex g -> Bool #

Ord (Vertex g) Source # 

Methods

compare :: Vertex g -> Vertex g -> Ordering #

(<) :: Vertex g -> Vertex g -> Bool #

(<=) :: Vertex g -> Vertex g -> Bool #

(>) :: Vertex g -> Vertex g -> Bool #

(>=) :: Vertex g -> Vertex g -> Bool #

max :: Vertex g -> Vertex g -> Vertex g #

min :: Vertex g -> Vertex g -> Vertex g #

Hashable (Vertex g) Source # 

Methods

hashWithSalt :: Int -> Vertex g -> Int #

hash :: Vertex g -> Int #

data Size g Source #

data Vertices g v Source #

All vertices in a Graph with matching type variable g.

Instances

Functor (Vertices g) Source # 

Methods

fmap :: (a -> b) -> Vertices g a -> Vertices g b #

(<$) :: a -> Vertices g b -> Vertices g a #

data MVertices s g v Source #

Mutable vertices that have the same length as the vertices in a Graph. This is used to safely implement algorithms that need to mark vertices as they traverse a graph.

data MUVertices s g v Source #

Mutable unboxed vertices that have the same length as the vertices in a Graph. See MVertices.

data MGraph s g e v Source #

This is more accurately thought of as a graph builder rather than a mutable graph. You can add vertices and edges, and you can delete edges, but you cannot delete vertices.

type STGraph s = MGraph s Source #