impure-containers-0.5.1: Mutable containers in Haskell.

Safe HaskellNone
LanguageHaskell2010

Data.Graph.Types.Internal

Description

Unsafe Internals

The internals provided here do not constitute part of the stable API. Additionally, they are unsafe. Using these data constructors directly can cause other functions in this library to segfault. If you find that you need something from this module, consider opening up an issue on github so that the functionality you need can be provided by the safe API instead.

Synopsis

Documentation

newtype 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.

Constructors

Graph 
Instances
Functor (Graph g e) Source # 
Instance details

Defined in Data.Graph.Types.Internal

Methods

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

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

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 # 
Instance details

Defined in Data.Graph.Types.Internal

Methods

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

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

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

Defined in Data.Graph.Types.Internal

Methods

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

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

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

Defined in Data.Graph.Types.Internal

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 #

newtype Size g Source #

Constructors

Size 

Fields

newtype 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.

Constructors

Vertex 
Instances
Eq (Vertex g) Source # 
Instance details

Defined in Data.Graph.Types.Internal

Methods

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

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

Ord (Vertex g) Source # 
Instance details

Defined in Data.Graph.Types.Internal

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 # 
Instance details

Defined in Data.Graph.Types.Internal

Methods

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

hash :: Vertex g -> Int #

newtype Vertices g v Source #

All vertices in a Graph with matching type variable g.

Constructors

Vertices 
Instances
Functor (Vertices g) Source # 
Instance details

Defined in Data.Graph.Types.Internal

Methods

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

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

newtype 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.

Constructors

MVertices 

newtype MUVertices s g v Source #

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

Constructors

MUVertices 

data IntPair Source #

A strict pair of Ints. This is used internally.

Constructors

IntPair !Int !Int 
Instances
Eq IntPair Source # 
Instance details

Defined in Data.Graph.Types.Internal

Methods

(==) :: IntPair -> IntPair -> Bool #

(/=) :: IntPair -> IntPair -> Bool #

Ord IntPair Source # 
Instance details

Defined in Data.Graph.Types.Internal

Read IntPair Source # 
Instance details

Defined in Data.Graph.Types.Internal

Show IntPair Source # 
Instance details

Defined in Data.Graph.Types.Internal

Generic IntPair Source # 
Instance details

Defined in Data.Graph.Types.Internal

Associated Types

type Rep IntPair :: Type -> Type #

Methods

from :: IntPair -> Rep IntPair x #

to :: Rep IntPair x -> IntPair #

Hashable IntPair Source # 
Instance details

Defined in Data.Graph.Types.Internal

Methods

hashWithSalt :: Int -> IntPair -> Int #

hash :: IntPair -> Int #

type Rep IntPair Source # 
Instance details

Defined in Data.Graph.Types.Internal

type Rep IntPair = D1 (MetaData "IntPair" "Data.Graph.Types.Internal" "impure-containers-0.5.1-DbosB0iVtXMA8RrcTl3qHF" False) (C1 (MetaCons "IntPair" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

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.

Constructors

MGraph 

type STGraph s = MGraph s Source #