haggle-0.3: A graph library offering mutable, immutable, and inductive graphs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Graph.Haggle.BiDigraph

Description

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

Documentation

data MBiDigraph m Source #

A mutable bidirectional graph

Instances

Instances details
MAddEdge MBiDigraph Source # 
Instance details

Defined in Data.Graph.Haggle.BiDigraph

Methods

addEdge :: (PrimMonad m, MonadRef m) => MBiDigraph m -> Vertex -> Vertex -> m (Maybe Edge) Source #

MAddVertex MBiDigraph Source # 
Instance details

Defined in Data.Graph.Haggle.BiDigraph

Methods

addVertex :: (PrimMonad m, MonadRef m) => MBiDigraph m -> m Vertex Source #

MBidirectional MBiDigraph Source # 
Instance details

Defined in Data.Graph.Haggle.BiDigraph

MGraph MBiDigraph Source # 
Instance details

Defined in Data.Graph.Haggle.BiDigraph

Associated Types

type ImmutableGraph MBiDigraph Source #

type ImmutableGraph MBiDigraph Source # 
Instance details

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

newSizedMBiDigraph Source #

Arguments

:: (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.