Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pangraph
Description
See Pangraph
for the type which provides a guaranteed well-formed graph once constructed. The rest of the modules provides constructors and getters on
this type.
Synopsis
- data Pangraph
- data Edge
- data Vertex
- type Attribute = (Key, Value)
- type Key = ByteString
- type Value = ByteString
- type VertexID = ByteString
- type EdgeID = Int
- type MalformedEdge = (Edge, (Maybe VertexID, Maybe VertexID))
- makePangraph :: [Vertex] -> [Edge] -> Maybe Pangraph
- makeEdge :: (VertexID, VertexID) -> [Attribute] -> Edge
- makeVertex :: VertexID -> [Attribute] -> Vertex
- edgeList :: Pangraph -> [Edge]
- vertexList :: Pangraph -> [Vertex]
- lookupVertex :: VertexID -> Pangraph -> Maybe Vertex
- lookupEdge :: EdgeID -> Pangraph -> Maybe Edge
- edgeAttributes :: Edge -> [Attribute]
- vertexAttributes :: Vertex -> [Attribute]
- edgeEndpoints :: Edge -> (VertexID, VertexID)
- edgeID :: Edge -> Maybe EdgeID
- vertexID :: Vertex -> VertexID
Abstract Types
The Pangraph
type is the core intermediate type between abstract representations of graphs.
Instances
A Vertex holds [Attribute
] and must have a unique VertexID
to be constructed with makeVertex
.
type VertexID = ByteString Source #
A field that is Maybe internally is exposed for lookup.