Hets - the Heterogeneous Tool Set

Copyright(c) Martin Erwig, Christian Maeder and Uni Bremen 1999-2006
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred

Common.Lib.Graph

Description

Tree-based implementation of Graph and DynGraph using Data.IntMap instead of Data.Graph.Inductive.Internal.FiniteMap

Synopsis

Documentation

newtype Gr a b

the graph type constructor

Constructors

Gr 

Fields

convertToMap :: IntMap (GrContext a b)
 

Instances

Graph Gr 
DynGraph Gr 
(Data a, Data b) => Data (Gr a b) 
(Show a, Show b) => Show (Gr a b) 
(ShATermConvertible a, ShATermConvertible b) => ShATermConvertible (Gr a b) 
(Pretty a, Pretty b) => Pretty (Gr a (Int, b)) 
(ShATermLG a, ShATermLG b) => ShATermLG (Gr a b) 
Typeable (* -> * -> *) Gr 

data GrContext a b

Constructors

GrContext 

Fields

nodeLabel :: a
 
nodeSuccs :: IntMap [b]
 
loops :: [b]
 
nodePreds :: IntMap [b]
 

decomposeGr :: Node -> Gr a b -> Maybe (GrContext a b, Gr a b)

getPaths :: Node -> Gr a b -> [[LEdge b]]

compute the possible cycle free paths from a start node

getAllPathsTo :: Node -> Gr a b -> [[LEdge b]]

compute the possible cycle free reversed paths from a start node

getPathsTo :: Node -> Node -> Gr a b -> [[LEdge b]]

compute the possible cycle free paths from a start node to a target node.

getLEdges :: Node -> Node -> Gr a b -> [b]

get all the edge labels between two nodes

delLEdge :: (b -> b -> Ordering) -> LEdge b -> Gr a b -> Gr a b

delete a labeled edge from a graph

insLEdge :: Bool -> (b -> b -> Ordering) -> LEdge b -> Gr a b -> (Gr a b, Bool)

insert a labeled edge into a graph, returns False if edge exists

delLNode :: (a -> a -> Bool) -> LNode a -> Gr a b -> Gr a b

delete a labeled node

labelNode :: LNode a -> Gr a b -> (Gr a b, a)

sets the node with new label and returns the new graph and the old label

getNewNode :: Gr a b -> Node

returns one new node id for the given graph

rmIsolated :: Gr a b -> Gr a b

remove isolated nodes without edges