graph-rewriting-0.6.0: Monadic graph rewriting of hypergraphs with ports and multiedges

Description

Enquiry of the graph structure. Note: In this module the term node is often used synonymously to node reference and node value. The two can easily distinguished by their type: the former has type Node the latter usually n.

Synopsis

# Documentation

readOnly :: WithGraph n a -> Rewrite n aSource

inspectNode :: (View v n, MonadReader (Graph n) m) => Node -> m vSource

a wrapper to inspect the given node

examineNode :: (View v n, MonadReader (Graph n) m) => (v -> a) -> Node -> m aSource

a wrapper to examine the given node

all of the graph's nodes

all of the graph's edges

attachedEdges :: (View [Port] n, MonadReader (Graph n) m) => Node -> m [Edge]Source

edges attached to the given node

non-empty set of nodes attached to the given edge

edgeCardinality :: (View [Port] n, MonadReader (Graph n) m) => Edge -> m IntSource

amount of ports the given hyperedge is connected to

neighbours :: (View [Port] n, MonadReader (Graph n) m) => Node -> m [Node]Source

list of nodes that are connected to the given node, not including the node itself

relatives :: (View [Port] n, MonadReader (Graph n) m) => Node -> m [Node]Source

list of nodes that are connected to the given node, including the node itself

nodes connected to given port of the specified node, not including the node itself

connected :: (View [Port] n, MonadReader (Graph n) m) => Node -> Node -> m BoolSource

whether two nodes are connected

free :: (View [Port] n, MonadReader (Graph n) m) => Port -> m BoolSource

whether the given ports features a dangling edge

withNodes :: MonadReader (Graph n) m => (Node -> m a) -> m [a]Source

Map node-relative enquiry over the nodes of the graph.

module Data.View