haskell-igraph-0.5.0: Haskell interface of the igraph library.

Safe HaskellNone
LanguageHaskell2010

IGraph.Mutable

Synopsis

Documentation

class MGraph d where Source #

Minimal complete definition

new, delEdges

Methods

new :: PrimMonad m => Int -> m (MLGraph (PrimState m) d v e) Source #

Create a new graph.

addNodes Source #

Arguments

:: PrimMonad m 
=> Int

The number of new nodes.

-> MLGraph (PrimState m) d v e 
-> m () 

Add nodes to the graph.

addLNodes Source #

Arguments

:: (Serialize v, PrimMonad m) 
=> [v]

vertices' labels

-> MLGraph (PrimState m) d v e 
-> m () 

Add nodes with labels to the graph.

delNodes :: PrimMonad m => [Int] -> MLGraph (PrimState m) d v e -> m () Source #

Delete nodes from the graph.

addEdges :: PrimMonad m => [(Int, Int)] -> MLGraph (PrimState m) d v e -> m () Source #

Add edges to the graph.

addLEdges :: (PrimMonad m, Serialize e) => [LEdge e] -> MLGraph (PrimState m) d v e -> m () Source #

Add edges with labels to the graph.

delEdges :: PrimMonad m => [(Int, Int)] -> MLGraph (PrimState m) d v e -> m () Source #

Delete edges from the graph.

Instances
MGraph D Source # 
Instance details

Methods

new :: PrimMonad m => Int -> m (MLGraph (PrimState m) D v e) Source #

addNodes :: PrimMonad m => Int -> MLGraph (PrimState m) D v e -> m () Source #

addLNodes :: (Serialize v, PrimMonad m) => [v] -> MLGraph (PrimState m) D v e -> m () Source #

delNodes :: PrimMonad m => [Int] -> MLGraph (PrimState m) D v e -> m () Source #

addEdges :: PrimMonad m => [(Int, Int)] -> MLGraph (PrimState m) D v e -> m () Source #

addLEdges :: (PrimMonad m, Serialize e) => [LEdge e] -> MLGraph (PrimState m) D v e -> m () Source #

delEdges :: PrimMonad m => [(Int, Int)] -> MLGraph (PrimState m) D v e -> m () Source #

MGraph U Source # 
Instance details

Methods

new :: PrimMonad m => Int -> m (MLGraph (PrimState m) U v e) Source #

addNodes :: PrimMonad m => Int -> MLGraph (PrimState m) U v e -> m () Source #

addLNodes :: (Serialize v, PrimMonad m) => [v] -> MLGraph (PrimState m) U v e -> m () Source #

delNodes :: PrimMonad m => [Int] -> MLGraph (PrimState m) U v e -> m () Source #

addEdges :: PrimMonad m => [(Int, Int)] -> MLGraph (PrimState m) U v e -> m () Source #

addLEdges :: (PrimMonad m, Serialize e) => [LEdge e] -> MLGraph (PrimState m) U v e -> m () Source #

delEdges :: PrimMonad m => [(Int, Int)] -> MLGraph (PrimState m) U v e -> m () Source #

newtype MLGraph m d v e Source #

Mutable labeled graph.

Constructors

MLGraph IGraph 

setEdgeAttr Source #

Arguments

:: (PrimMonad m, Serialize e) 
=> Int

Edge id

-> e 
-> MLGraph (PrimState m) d v e 
-> m () 

Set edge attribute.

setNodeAttr Source #

Arguments

:: (PrimMonad m, Serialize v) 
=> Int

Node id

-> v 
-> MLGraph (PrimState m) d v e 
-> m () 

Set node attribute.