haggle-0.1.0.0: A graph library offering mutable, immutable, and inductive graphs

Safe HaskellNone
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
MBidirectional MBiDigraph Source # 
Instance details

Defined in Data.Graph.Haggle.BiDigraph

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 #

MGraph MBiDigraph Source # 
Instance details

Defined in Data.Graph.Haggle.BiDigraph

Associated Types

type ImmutableGraph MBiDigraph :: Type 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.