Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
- newtype Graph g e v = Graph {
- getGraphInternal :: SomeGraph e v
- data SomeGraph e v = SomeGraph {
- graphVertices :: !(Vector v)
- graphOutboundNeighborVertices :: !(Vector (Vector Int))
- graphOutboundNeighborEdges :: !(Vector (Vector e))
- newtype Size g = Size {}
- newtype Vertex g = Vertex {}
- newtype Vertices g v = Vertices {}
- newtype MVertices s g v = MVertices {
- getMVerticesInternal :: MVector s v
- newtype MUVertices s g v = MUVertices {
- getMUVerticesInternal :: MVector s v
- data IntPair = IntPair !Int !Int
- data MGraph s g e v = MGraph {
- mgraphVertexIndex :: !(MHashMap s v Int)
- mgraphCurrentId :: !(MutVar s Int)
- mgraphEdges :: !(MHashMap s IntPair e)
- type IOGraph = MGraph RealWorld
- type STGraph s = MGraph s
Documentation
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.
Graph | |
|
This is a Graph
without the phantom type variable. Very few
functions work with this type.
SomeGraph | |
|
All vertices in a Graph
with matching type variable g
.
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.
MVertices | |
|
newtype MUVertices s g v Source #
A strict pair of Int
s. This is used internally.
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.
MGraph | |
|