Graphalyze-0.1: Graph-Theoretic Analysis library.Source codeContentsIndex
Data.Graph.Analysis.Types
MaintainerIvan.Miljenovic@gmail.com
Contents
Graph specialization
Graph Label classes
Description
This module defines the various types and classes utilised by the Graphalyze library.
Synopsis
data GraphData a = GraphData {
graph :: AGr a
wantedRoots :: LNGroup a
}
type AGr a = Gr a ()
type NGroup = [Node]
type LNGroup a = [LNode a]
class Ord c => ClusterLabel a c | a -> c where
cluster :: a -> c
nodelabel :: a -> String
data GenCluster a = GC Int a
data PosLabel a = PLabel {
xPos :: Int
yPos :: Int
pnode :: Node
plabel :: a
}
Graph specialization
data GraphData a Source

By default, the Graphalyze library works on graphs with no edge labels. As such, these types provide useful aliases for the default FGL types. Most of the algorithms, however, work on arbitrary graph types.

Represents information about the graph being analysed.

Constructors
GraphData
graph :: AGr aWe use a graph type with no edge labels.
wantedRoots :: LNGroup aThe expected roots in the graph.
show/hide Instances
type AGr a = Gr a ()Source
We use a basic tree-based graph by default.
type NGroup = [Node]Source
A grouping of Nodes.
type LNGroup a = [LNode a]Source
A grouping of LNodes.
Graph Label classes
class Ord c => ClusterLabel a c | a -> c whereSource

These types and classes represent useful label types.

The class of outputs of a clustering algorithm. This class is mainly used for visualization purposes, with the Ord instance required for grouping. Instances of this class are intended for use as the label type of graphs.

Methods
cluster :: a -> cSource
The cluster the node label belongs in.
nodelabel :: a -> StringSource
The printed form of the actual label.
show/hide Instances
data GenCluster a Source
A generic cluster-label type.
Constructors
GC Int a
show/hide Instances
data PosLabel a Source
Label type for storing node positions. Note that this isn't an instance of ClusterLabel since there's no clear indication on which cluster a node belongs to at this stage.
Constructors
PLabel
xPos :: Int
yPos :: Int
pnode :: Node
plabel :: a
show/hide Instances
Eq a => Eq (PosLabel a)
Show a => Show (PosLabel a)
Eq a => Metric (PosLabel a)
Produced by Haddock version 2.3.0