Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This graph is an efficient representation of bidirectional graphs with parallel edges.
This is in contrast to SimpleBiDigraph
, which
can only handle simple graphs (i.e., without parallel edges).
The representation is slightly less efficient as a result.
Synopsis
- data MBiDigraph m
- data BiDigraph
- newMBiDigraph :: (PrimMonad m, MonadRef m) => m (MBiDigraph m)
- newSizedMBiDigraph :: (PrimMonad m, MonadRef m) => Int -> Int -> m (MBiDigraph m)
Documentation
data MBiDigraph m Source #
A mutable bidirectional graph
Instances
An immutable bidirectional graph
Instances
Bidirectional BiDigraph Source # | |
Graph BiDigraph Source # | |
Defined in Data.Graph.Haggle.BiDigraph vertices :: BiDigraph -> [Vertex] Source # edges :: BiDigraph -> [Edge] Source # successors :: BiDigraph -> Vertex -> [Vertex] Source # outEdges :: BiDigraph -> Vertex -> [Edge] Source # maxVertexId :: BiDigraph -> Int Source # isEmpty :: BiDigraph -> Bool Source # edgesBetween :: BiDigraph -> Vertex -> Vertex -> [Edge] Source # | |
Thawable BiDigraph Source # | |
type MutableGraph BiDigraph Source # | |
Defined in Data.Graph.Haggle.BiDigraph |
newMBiDigraph :: (PrimMonad m, MonadRef m) => m (MBiDigraph m) Source #
Allocate a new mutable bidirectional graph with a default size
:: (PrimMonad m, MonadRef m) | |
=> Int | Reserved space for nodes |
-> Int | Reserved space for edges |
-> m (MBiDigraph m) |
Allocate a new mutable bidirectional graph with space reserved for nodes and edges. This can be more efficient and avoid resizing.