graph-generators-0.1.4.0: Functions for generating structured or random FGL graphs

Data.Graph.Generators

Synopsis

# Documentation

data GraphInfo Source #

The information required to build a graph.

This datastructure is designed to occupy minimal space. With n being the number of nodes, the edge list contains tuples (from, to), denoting an edge from node *from* to node *to* where *from* and *to* are integers less than the number of nodes.

Note that for a graph with n nodes, the nodes are labelled [0..n-1].

This data structure is library-agnostic and can be converted to arbitrary representations.

Constructors

 GraphInfo FieldsnumNodes :: IntNumber of nodesedges :: [(Int, Int)]Edge list

Instances

 Source # Methods Source # MethodsshowList :: [GraphInfo] -> ShowS #

The context of a single graph node.

This data-structure is library-agnostic, however, it is isomophic to FGL's UContext

Constructors

 GraphContext FieldsinEdges :: [Int]Nodes having an edge to the current nodenodeLabel :: IntThe node identifier of the current nodeoutEdges :: [Int]Nodes having an ingoing edge from the current node

Check the integrity of a GraphInfo instance: Ensures for every edge (i,j), the following condition is met: 0 <= i < n && 0 <= j < n

Get the edge count for a given GraphInfo instance