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

Safe HaskellNone
LanguageHaskell2010

IGraph.Internal.Graph

Synopsis

Documentation

newtype IGraph Source #

Constructors

IGraph (ForeignPtr IGraph) 

withIGraph :: IGraph -> (Ptr IGraph -> IO b) -> IO b Source #

igraphNew :: Int -> Bool -> HasInit -> IO IGraph Source #

Create a igraph object and attach a finalizer

igraphAddEdges Source #

Arguments

:: IGraph

The graph to which the edges will be added.

-> Vector

The edges themselves.

-> Ptr ()

The attributes of the new edges.

-> IO () 

The edges are given in a vector, the first two elements define the first edge (the order is from , to for directed graphs). The vector should contain even number of integer numbers between zero and the number of vertices in the graph minus one (inclusive). If you also want to add new vertices, call igraph_add_vertices() first.