Package eu.bandm.tools.graph
Class GraphModels
java.lang.Object
eu.bandm.tools.graph.GraphModels
Utility class. DOCME
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V> Multimap
<V, V> adjacency
(RootedGraphModel<V> model) static <V> GraphModel
<V> static <V> RootedGraphModel
<V> adjacentAllRoots
(Multimap<V, ? extends V> m) static <V,
A> AdHocAnnotatedGraphModel <V, A> annotate
(GraphModel<V> parent, Class<A> annotationType) static <V> GraphModel
<V> cache
(GraphModel<V> parent) <V> void
dfs
(Consumer<? super V> sink, boolean multiply, RootedGraphModel<V> graph) static <V> void
dfsInteractive
(Function<? super V, ? extends Collection<? extends V>> fun, boolean multiply, V... roots) static <V,
W> RootedGraphModel <W> map
(Function<? super V, ? extends W> fun, RootedGraphModel<V> parent) static <V> Collection
<V> static <V> Collection
<V> neighbours
(V v) static <V> Collection
<V> neighbours
(V... vs) static <V> Collection
<V> neighboursSet
(V... vs) static <V extends Node<V>>
GraphModel<V> nodes()
static <V> TopologicalSorter
<V> postorder
(RootedGraphModel<V> model) static <V> TopologicalSorter
<V> preorder
(RootedGraphModel<V> model) static <V> TopologicalSorter
<V> reachable
(RootedGraphModel<V> model) static <V> AdHocRootedGraphModel
<V> roots
(GraphModel<V> parent, Collection<? extends V> roots) static <V> AdHocRootedGraphModel
<V> roots
(GraphModel<V> parent, V... roots) static <V> SCCGraphModel
<V> sccs
(RootedGraphModel<V> parent) static <V> SCCGraphModel
<V> sccs
(RootedGraphModel<V> parent, boolean retainCycles) static <V> TopologicalSorter
<V> topsort
(RootedGraphModel<V> model, TraversalOrder order, boolean weak)
-
Method Details
-
nodes
-
neighbours
-
neighbours
-
neighbours
-
neighboursSet
-
roots
-
roots
public static <V> AdHocRootedGraphModel<V> roots(GraphModel<V> parent, Collection<? extends V> roots) -
annotate
public static <V,A> AdHocAnnotatedGraphModel<V,A> annotate(GraphModel<V> parent, Class<A> annotationType) -
sccs
-
sccs
-
adjacency
-
adjacent
-
adjacentAllRoots
-
topsort
public static <V> TopologicalSorter<V> topsort(RootedGraphModel<V> model, TraversalOrder order, boolean weak) -
reachable
-
preorder
-
postorder
-
map
public static <V,W> RootedGraphModel<W> map(Function<? super V, ? extends W> fun, RootedGraphModel<V> parent) -
cache
-
dfs
-
dfsInteractive
@SafeVarargs public static <V> void dfsInteractive(Function<? super V, ? extends Collection<? extends V>> fun, boolean multiply, V... roots)
-