{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
module Data.Graph.Haggle (
D.MDigraph,
D.newMDigraph,
D.newSizedMDigraph,
B.MBiDigraph,
B.newMBiDigraph,
B.newSizedMBiDigraph,
SBD.MSimpleBiDigraph,
SBD.newMSimpleBiDigraph,
SBD.newSizedMSimpleBiDigraph,
EA.EdgeLabeledMGraph,
EA.newEdgeLabeledGraph,
EA.newSizedEdgeLabeledGraph,
VA.VertexLabeledMGraph,
VA.newVertexLabeledGraph,
VA.newSizedVertexLabeledGraph,
A.LabeledMGraph,
A.newLabeledGraph,
A.newSizedLabeledGraph,
D.Digraph,
B.BiDigraph,
SBD.SimpleBiDigraph,
EA.EdgeLabeledGraph,
VA.VertexLabeledGraph,
VA.fromEdgeList,
A.LabeledGraph,
A.fromLabeledEdgeList,
PT.PatriciaTree,
I.Vertex,
I.Edge,
I.edgeSource,
I.edgeDest,
getVertices,
getSuccessors,
getOutEdges,
countVertices,
countEdges,
checkEdgeExists,
freeze,
addVertex,
addEdge,
getEdgeLabel,
unsafeGetEdgeLabel,
addLabeledEdge,
getVertexLabel,
addLabeledVertex,
getLabeledVertices,
removeVertex,
removeEdgesBetween,
removeEdge,
getPredecessors,
getInEdges,
A.mapEdgeLabel,
A.mapVertexLabel,
vertices,
edges,
successors,
outEdges,
edgesBetween,
edgeExists,
isEmpty,
thaw,
predecessors,
inEdges,
edgeLabel,
labeledEdges,
labeledOutEdges,
vertexLabel,
labeledVertices,
labeledInEdges,
emptyGraph,
match,
context,
insertLabeledVertex,
insertLabeledEdge,
deleteEdge,
deleteEdgesBetween,
replaceLabeledEdge,
deleteVertex,
I.Context(..),
I.MGraph,
I.ImmutableGraph,
I.MAddVertex,
I.MAddEdge,
I.MLabeledEdge,
I.MEdgeLabel,
I.MLabeledVertex,
I.MVertexLabel,
I.MRemovable,
I.MBidirectional,
I.Graph,
I.Thawable,
I.MutableGraph,
I.Bidirectional,
I.HasEdgeLabel,
I.EdgeLabel,
I.HasVertexLabel,
I.VertexLabel,
I.BidirectionalEdgeLabel,
I.InductiveGraph
) where
import qualified Control.Monad.Primitive as P
import qualified Control.Monad.Ref as R
import qualified Data.Graph.Haggle.Classes as I
import qualified Data.Graph.Haggle.Digraph as D
import qualified Data.Graph.Haggle.BiDigraph as B
import qualified Data.Graph.Haggle.SimpleBiDigraph as SBD
import qualified Data.Graph.Haggle.PatriciaTree as PT
import qualified Data.Graph.Haggle.EdgeLabelAdapter as EA
import qualified Data.Graph.Haggle.VertexLabelAdapter as VA
import qualified Data.Graph.Haggle.LabelAdapter as A
getVertices :: (I.MGraph g, P.PrimMonad m, R.MonadRef m) => g m -> m [I.Vertex]
getVertices = I.getVertices
{-# INLINABLE getVertices #-}
getSuccessors :: (I.MGraph g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> m [I.Vertex]
getSuccessors = I.getSuccessors
{-# INLINABLE getSuccessors #-}
getOutEdges :: (I.MGraph g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> m [I.Edge]
getOutEdges = I.getOutEdges
{-# INLINABLE getOutEdges #-}
countVertices :: (I.MGraph g, P.PrimMonad m, R.MonadRef m) => g m -> m Int
countVertices = I.countVertices
{-# INLINABLE countVertices #-}
countEdges :: (I.MGraph g, P.PrimMonad m, R.MonadRef m) => g m -> m Int
countEdges = I.countEdges
{-# INLINABLE countEdges #-}
checkEdgeExists :: (I.MGraph g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> I.Vertex -> m Bool
checkEdgeExists = I.checkEdgeExists
{-# INLINABLE checkEdgeExists #-}
freeze :: (I.MGraph g, P.PrimMonad m, R.MonadRef m) => g m -> m (I.ImmutableGraph g)
freeze = I.freeze
{-# INLINABLE freeze #-}
addVertex :: (I.MAddVertex g, P.PrimMonad m, R.MonadRef m) => g m -> m I.Vertex
addVertex = I.addVertex
{-# INLINABLE addVertex #-}
addEdge :: (I.MAddEdge g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> I.Vertex -> m (Maybe I.Edge)
addEdge = I.addEdge
{-# INLINABLE addEdge #-}
getEdgeLabel :: (I.MLabeledEdge g, P.PrimMonad m, R.MonadRef m) => g m -> I.Edge -> m (Maybe (I.MEdgeLabel g))
getEdgeLabel = I.getEdgeLabel
{-# INLINABLE getEdgeLabel #-}
unsafeGetEdgeLabel :: (I.MLabeledEdge g, P.PrimMonad m, R.MonadRef m) => g m -> I.Edge -> m (I.MEdgeLabel g)
unsafeGetEdgeLabel = I.unsafeGetEdgeLabel
{-# INLINABLE unsafeGetEdgeLabel #-}
addLabeledEdge :: (I.MLabeledEdge g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> I.Vertex -> I.MEdgeLabel g -> m (Maybe I.Edge)
addLabeledEdge = I.addLabeledEdge
{-# INLINABLE addLabeledEdge #-}
getVertexLabel :: (I.MLabeledVertex g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> m (Maybe (I.MVertexLabel g))
getVertexLabel = I.getVertexLabel
{-# INLINABLE getVertexLabel #-}
addLabeledVertex :: (I.MLabeledVertex g, P.PrimMonad m, R.MonadRef m) => g m -> I.MVertexLabel g -> m I.Vertex
addLabeledVertex = I.addLabeledVertex
{-# INLINABLE addLabeledVertex #-}
getLabeledVertices :: (I.MLabeledVertex g, P.PrimMonad m, R.MonadRef m) => g m -> m [(I.Vertex, I.MVertexLabel g)]
getLabeledVertices = I.getLabeledVertices
{-# INLINABLE getLabeledVertices #-}
removeVertex :: (I.MRemovable g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> m ()
removeVertex = I.removeVertex
{-# INLINABLE removeVertex #-}
removeEdgesBetween :: (I.MRemovable g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> I.Vertex -> m ()
removeEdgesBetween = I.removeEdgesBetween
{-# INLINABLE removeEdgesBetween #-}
removeEdge :: (I.MRemovable g, P.PrimMonad m, R.MonadRef m) => g m -> I.Edge -> m ()
removeEdge = I.removeEdge
{-# INLINABLE removeEdge #-}
getPredecessors :: (I.MBidirectional g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> m [I.Vertex]
getPredecessors = I.getPredecessors
{-# INLINABLE getPredecessors #-}
getInEdges :: (I.MBidirectional g, P.PrimMonad m, R.MonadRef m) => g m -> I.Vertex -> m [I.Edge]
getInEdges = I.getInEdges
{-# INLINABLE getInEdges #-}
vertices :: (I.Graph g) => g -> [I.Vertex]
vertices = I.vertices
{-# INLINABLE vertices #-}
edges :: (I.Graph g) => g -> [I.Edge]
edges = I.edges
{-# INLINABLE edges #-}
successors :: (I.Graph g) => g -> I.Vertex -> [I.Vertex]
successors = I.successors
{-# INLINABLE successors #-}
outEdges :: (I.Graph g) => g -> I.Vertex -> [I.Edge]
outEdges = I.outEdges
{-# INLINABLE outEdges #-}
edgesBetween :: (I.Graph g) => g -> I.Vertex -> I.Vertex -> [I.Edge]
edgesBetween = I.edgesBetween
{-# INLINABLE edgesBetween #-}
edgeExists :: (I.Graph g) => g -> I.Vertex -> I.Vertex -> Bool
edgeExists = I.edgeExists
{-# INLINABLE edgeExists #-}
isEmpty :: (I.Graph g) => g -> Bool
isEmpty = I.isEmpty
{-# INLINABLE isEmpty #-}
thaw :: (I.Thawable g, P.PrimMonad m, R.MonadRef m) => g -> m (I.MutableGraph g m)
thaw = I.thaw
{-# INLINABLE thaw #-}
predecessors :: (I.Bidirectional g) => g -> I.Vertex -> [I.Vertex]
predecessors = I.predecessors
{-# INLINABLE predecessors #-}
inEdges :: (I.Bidirectional g) => g -> I.Vertex -> [I.Edge]
inEdges = I.inEdges
{-# INLINABLE inEdges #-}
edgeLabel :: (I.HasEdgeLabel g) => g -> I.Edge -> Maybe (I.EdgeLabel g)
edgeLabel = I.edgeLabel
{-# INLINABLE edgeLabel #-}
labeledEdges :: (I.HasEdgeLabel g) => g -> [(I.Edge, I.EdgeLabel g)]
labeledEdges = I.labeledEdges
{-# INLINABLE labeledEdges #-}
labeledOutEdges :: (I.HasEdgeLabel g) => g -> I.Vertex -> [(I.Edge, I.EdgeLabel g)]
labeledOutEdges = I.labeledOutEdges
{-# INLINABLE labeledOutEdges #-}
labeledInEdges :: (I.BidirectionalEdgeLabel g) => g -> I.Vertex -> [(I.Edge, I.EdgeLabel g)]
labeledInEdges = I.labeledInEdges
{-# INLINABLE labeledInEdges #-}
vertexLabel :: (I.HasVertexLabel g) => g -> I.Vertex -> Maybe (I.VertexLabel g)
vertexLabel = I.vertexLabel
{-# INLINABLE vertexLabel #-}
labeledVertices :: (I.HasVertexLabel g) => g -> [(I.Vertex, I.VertexLabel g)]
labeledVertices = I.labeledVertices
{-# INLINABLE labeledVertices #-}
emptyGraph :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g
emptyGraph = I.emptyGraph
{-# INLINABLE emptyGraph #-}
match :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g -> I.Vertex -> Maybe (I.Context g, g)
match = I.match
{-# INLINABLE match #-}
context :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g -> I.Vertex -> Maybe (I.Context g)
context = I.context
{-# INLINABLE context #-}
insertLabeledVertex :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g -> I.VertexLabel g -> (I.Vertex, g)
insertLabeledVertex = I.insertLabeledVertex
{-# INLINABLE insertLabeledVertex #-}
insertLabeledEdge :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g -> I.Vertex -> I.Vertex -> I.EdgeLabel g -> Maybe (I.Edge, g)
insertLabeledEdge = I.insertLabeledEdge
{-# INLINABLE insertLabeledEdge #-}
deleteEdge :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g -> I.Edge -> g
deleteEdge = I.deleteEdge
{-# INLINABLE deleteEdge #-}
deleteEdgesBetween :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g -> I.Vertex -> I.Vertex -> g
deleteEdgesBetween = I.deleteEdgesBetween
{-# INLINABLE deleteEdgesBetween #-}
replaceLabeledEdge :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g -> I.Vertex -> I.Vertex -> I.EdgeLabel g -> Maybe (I.Edge, g)
replaceLabeledEdge = I.replaceLabeledEdge
{-# INLINABLE replaceLabeledEdge #-}
deleteVertex :: (I.InductiveGraph g, I.Graph g, I.HasEdgeLabel g, I.HasVertexLabel g) => g -> I.Vertex -> g
deleteVertex = I.deleteVertex
{-# INLINABLE deleteVertex #-}