uni-graphs-2.2.1.1: Graphs

Graphs.RemoveAncestors

Description

The removeAncestors function in this module (actually an IO action) takes a graph G and a list of nodes N and computes N' = { n in N | there does not exist an m in N and a non-trivial path n -> m }. This is required for graph merging.

Synopsis

# Documentation

removeAncestors :: Graph graph => graph nodeLabel nodeTypeLabel arcLabel arcTypeLabel -> [Node] -> IO [Node] Source #

Takes a graph G and a list of nodes N and computes N' = { n in N | there does not exist an m in N and a non-trivial path n -> m }.

removeAncestorsBy :: (Ord node, Monad m) => (node -> m [node]) -> [node] -> m [node] Source #

General removeAncestors function, which takes as argument the action computing a Node's successors.

removeAncestorsByPure :: Ord node => (node -> [node]) -> [node] -> [node] Source #

Pure version of removeAncestorsBy.