public class DynamicGraph<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DynamicGraph.Status |
Constructor and Description |
---|
DynamicGraph() |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(T from,
T to)
Add an edge between two nodes.
|
void |
addNode(T node)
Add a node to the graph.
|
ListMultiMap<T,T> |
getEdges() |
java.util.List<T> |
getFreeNodes() |
int |
getNodeCount() |
int |
getNodeCountWithStatus(DynamicGraph.Status status) |
void |
setComparator(java.util.Comparator<? super T> c)
Define a comparator for the nodes of this graph, which will be used
to order the free nodes when they are asked.
|
void |
setStatus(java.util.Collection<T> nodes,
DynamicGraph.Status status)
Set the status for a set of nodes.
|
void |
setStatus(T node,
DynamicGraph.Status status)
Set the status for a node.
|
java.lang.String |
toDot() |
java.lang.String |
toString() |
public void setComparator(java.util.Comparator<? super T> c)
public void addNode(T node)
public java.util.List<T> getFreeNodes()
public void setStatus(java.util.Collection<T> nodes, DynamicGraph.Status status)
public void setStatus(T node, DynamicGraph.Status status)
public int getNodeCount()
public int getNodeCountWithStatus(DynamicGraph.Status status)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDot()
public ListMultiMap<T,T> getEdges()