public class GraphUtils extends Object
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Class and Description |
---|---|
static interface |
GraphUtils.DependencyKind
Basic interface for defining various dependency kinds.
|
static class |
GraphUtils.Node<D>
This class is a basic abstract class for representing a node.
|
static class |
GraphUtils.TarjanNode<D>
This class specialized Node, by adding elements that are required in order
to perform Tarjan computation of strongly connected components.
|
Constructor and Description |
---|
GraphUtils() |
Modifier and Type | Method and Description |
---|---|
static <D,N extends GraphUtils.TarjanNode<D>> |
tarjan(Iterable<? extends N> nodes)
Tarjan's algorithm to determine strongly connected components of a
directed graph in linear time.
|
static <D> String |
toDot(Iterable<? extends GraphUtils.TarjanNode<D>> nodes,
String name,
String header)
Debugging: dot representation of a set of connected nodes.
|
public static <D,N extends GraphUtils.TarjanNode<D>> List<? extends List<? extends N>> tarjan(Iterable<? extends N> nodes)
public static <D> String toDot(Iterable<? extends GraphUtils.TarjanNode<D>> nodes, String name, String header)
Node.toString
to display node labels
and Node.printDependency
to display edge labels. The resulting
representation is also customizable with a graph name and a header.Copyright © 2017 earcam. All rights reserved.