graphs-0.7.2: A simple monadic graph library
Copyright(C) 2011 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitytype families
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Graph.AdjacencyList

Description

 
Synopsis

Documentation

newtype AdjacencyList i a Source #

Constructors

AdjacencyList 

Fields

Instances

Instances details
Monad (AdjacencyList i) Source # 
Instance details

Defined in Data.Graph.AdjacencyList

Methods

(>>=) :: AdjacencyList i a -> (a -> AdjacencyList i b) -> AdjacencyList i b #

(>>) :: AdjacencyList i a -> AdjacencyList i b -> AdjacencyList i b #

return :: a -> AdjacencyList i a #

Functor (AdjacencyList i) Source # 
Instance details

Defined in Data.Graph.AdjacencyList

Methods

fmap :: (a -> b) -> AdjacencyList i a -> AdjacencyList i b #

(<$) :: a -> AdjacencyList i b -> AdjacencyList i a #

Applicative (AdjacencyList i) Source # 
Instance details

Defined in Data.Graph.AdjacencyList

Methods

pure :: a -> AdjacencyList i a #

(<*>) :: AdjacencyList i (a -> b) -> AdjacencyList i a -> AdjacencyList i b #

liftA2 :: (a -> b -> c) -> AdjacencyList i a -> AdjacencyList i b -> AdjacencyList i c #

(*>) :: AdjacencyList i a -> AdjacencyList i b -> AdjacencyList i b #

(<*) :: AdjacencyList i a -> AdjacencyList i b -> AdjacencyList i a #

Ord i => Graph (AdjacencyList i) Source # 
Instance details

Defined in Data.Graph.AdjacencyList

Associated Types

type Vertex (AdjacencyList i) Source #

type Edge (AdjacencyList i) Source #

Ix i => AdjacencyListGraph (AdjacencyList i) Source # 
Instance details

Defined in Data.Graph.AdjacencyList

type Vertex (AdjacencyList i) Source # 
Instance details

Defined in Data.Graph.AdjacencyList

type Vertex (AdjacencyList i) = i
type Edge (AdjacencyList i) Source # 
Instance details

Defined in Data.Graph.AdjacencyList

type Edge (AdjacencyList i) = (i, i)

class Graph g => AdjacencyListGraph g Source #

Minimal definition: source, target, and either adjacentVertices with outEdges = defaultOutEdges or outEdges

Minimal complete definition

source, target, outEdges

Instances

Instances details
AdjacencyListGraph Identity Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

AdjacencyListGraph g => AdjacencyListGraph (MaybeT g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

BidirectionalGraph g => AdjacencyListGraph (Dual g) Source # 
Instance details

Defined in Data.Graph.Dual

Methods

source :: Edge (Dual g) -> Dual g (Vertex (Dual g)) Source #

target :: Edge (Dual g) -> Dual g (Vertex (Dual g)) Source #

outEdges :: Vertex (Dual g) -> Dual g [Edge (Dual g)] Source #

outDegree :: Vertex (Dual g) -> Dual g Int Source #

adjacentVertices :: Vertex (Dual g) -> Dual g [Vertex (Dual g)] Source #

Ix i => AdjacencyListGraph (AdjacencyList i) Source # 
Instance details

Defined in Data.Graph.AdjacencyList

(AdjacencyListGraph g, Monoid m) => AdjacencyListGraph (WriterT m g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

Methods

source :: Edge (WriterT m g) -> WriterT m g (Vertex (WriterT m g)) Source #

target :: Edge (WriterT m g) -> WriterT m g (Vertex (WriterT m g)) Source #

outEdges :: Vertex (WriterT m g) -> WriterT m g [Edge (WriterT m g)] Source #

outDegree :: Vertex (WriterT m g) -> WriterT m g Int Source #

adjacentVertices :: Vertex (WriterT m g) -> WriterT m g [Vertex (WriterT m g)] Source #

(AdjacencyListGraph g, Monoid m) => AdjacencyListGraph (WriterT m g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

Methods

source :: Edge (WriterT m g) -> WriterT m g (Vertex (WriterT m g)) Source #

target :: Edge (WriterT m g) -> WriterT m g (Vertex (WriterT m g)) Source #

outEdges :: Vertex (WriterT m g) -> WriterT m g [Edge (WriterT m g)] Source #

outDegree :: Vertex (WriterT m g) -> WriterT m g Int Source #

adjacentVertices :: Vertex (WriterT m g) -> WriterT m g [Vertex (WriterT m g)] Source #

AdjacencyListGraph g => AdjacencyListGraph (StateT s g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

Methods

source :: Edge (StateT s g) -> StateT s g (Vertex (StateT s g)) Source #

target :: Edge (StateT s g) -> StateT s g (Vertex (StateT s g)) Source #

outEdges :: Vertex (StateT s g) -> StateT s g [Edge (StateT s g)] Source #

outDegree :: Vertex (StateT s g) -> StateT s g Int Source #

adjacentVertices :: Vertex (StateT s g) -> StateT s g [Vertex (StateT s g)] Source #

AdjacencyListGraph g => AdjacencyListGraph (StateT s g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

Methods

source :: Edge (StateT s g) -> StateT s g (Vertex (StateT s g)) Source #

target :: Edge (StateT s g) -> StateT s g (Vertex (StateT s g)) Source #

outEdges :: Vertex (StateT s g) -> StateT s g [Edge (StateT s g)] Source #

outDegree :: Vertex (StateT s g) -> StateT s g Int Source #

adjacentVertices :: Vertex (StateT s g) -> StateT s g [Vertex (StateT s g)] Source #

AdjacencyListGraph g => AdjacencyListGraph (ReaderT e g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

Methods

source :: Edge (ReaderT e g) -> ReaderT e g (Vertex (ReaderT e g)) Source #

target :: Edge (ReaderT e g) -> ReaderT e g (Vertex (ReaderT e g)) Source #

outEdges :: Vertex (ReaderT e g) -> ReaderT e g [Edge (ReaderT e g)] Source #

outDegree :: Vertex (ReaderT e g) -> ReaderT e g Int Source #

adjacentVertices :: Vertex (ReaderT e g) -> ReaderT e g [Vertex (ReaderT e g)] Source #

AdjacencyListGraph g => AdjacencyListGraph (IdentityT g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

(AdjacencyListGraph g, Error e) => AdjacencyListGraph (ErrorT e g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

Methods

source :: Edge (ErrorT e g) -> ErrorT e g (Vertex (ErrorT e g)) Source #

target :: Edge (ErrorT e g) -> ErrorT e g (Vertex (ErrorT e g)) Source #

outEdges :: Vertex (ErrorT e g) -> ErrorT e g [Edge (ErrorT e g)] Source #

outDegree :: Vertex (ErrorT e g) -> ErrorT e g Int Source #

adjacentVertices :: Vertex (ErrorT e g) -> ErrorT e g [Vertex (ErrorT e g)] Source #

(AdjacencyListGraph g, Monoid m) => AdjacencyListGraph (RWST r m s g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

Methods

source :: Edge (RWST r m s g) -> RWST r m s g (Vertex (RWST r m s g)) Source #

target :: Edge (RWST r m s g) -> RWST r m s g (Vertex (RWST r m s g)) Source #

outEdges :: Vertex (RWST r m s g) -> RWST r m s g [Edge (RWST r m s g)] Source #

outDegree :: Vertex (RWST r m s g) -> RWST r m s g Int Source #

adjacentVertices :: Vertex (RWST r m s g) -> RWST r m s g [Vertex (RWST r m s g)] Source #

(AdjacencyListGraph g, Monoid m) => AdjacencyListGraph (RWST r m s g) Source # 
Instance details

Defined in Data.Graph.Class.AdjacencyList

Methods

source :: Edge (RWST r m s g) -> RWST r m s g (Vertex (RWST r m s g)) Source #

target :: Edge (RWST r m s g) -> RWST r m s g (Vertex (RWST r m s g)) Source #

outEdges :: Vertex (RWST r m s g) -> RWST r m s g [Edge (RWST r m s g)] Source #

outDegree :: Vertex (RWST r m s g) -> RWST r m s g Int Source #

adjacentVertices :: Vertex (RWST r m s g) -> RWST r m s g [Vertex (RWST r m s g)] Source #