|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javautils.graph.GraphDecorator
|
+--javautils.graph.AugmentedGraphDecorator
|
+--javautils.graph.TransposedGraph
A transposed graph. The purpose of this class is to support efficient graph transposition. Transposed graphs are created from augmented graphs because the information needed to transpose a graph is essentially the same information that an augmented graph already has.
| Method Summary | |
java.util.List |
edgesFrom(java.lang.Object node)
List of all edges from the specified source node. |
java.util.List |
edgesTo(java.lang.Object node)
List of all edges to the specified target node. |
static AugmentedGraph |
from(AugmentedGraph graph)
A transposed version of the given graph. |
java.lang.Object |
sourceOf(java.lang.Object edge)
The source node of the edge. |
java.lang.Object |
targetOf(java.lang.Object edge)
The target node of the edge. |
| Methods inherited from class javautils.graph.AugmentedGraphDecorator |
augmented, isNode |
| Methods inherited from class javautils.graph.GraphDecorator |
graph, nodes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javautils.graph.adt.Graph |
nodes |
| Method Detail |
public static AugmentedGraph from(AugmentedGraph graph)
A transposed version of the given graph. If the graph is a transposed graph, the original graph is returned.
public java.util.List edgesFrom(java.lang.Object node)
GraphList of all edges from the specified source node.
Important: This method should have O(1) time
complexity. This means that you should avoid constructing the list
each time this method is called.
Note: The order of edges in the returned list may have an effect on the results of graph algorithms.
edgesFrom in interface GraphedgesFrom in class GraphDecoratorpublic java.util.List edgesTo(java.lang.Object node)
AugmentedGraphList of all edges to the specified target node.
Important: This method should have O(1) time
complexity. This means that you should avoid constructing the list
each time this method is called.
Note: The order of edges in the returned list may have an effect on the results of graph algorithms.
edgesTo in interface AugmentedGraphedgesTo in class AugmentedGraphDecoratorpublic java.lang.Object targetOf(java.lang.Object edge)
GraphThe target node of the edge.
targetOf in interface GraphtargetOf in class GraphDecoratorpublic java.lang.Object sourceOf(java.lang.Object edge)
GraphThe source node of the edge.
sourceOf in interface GraphsourceOf in class GraphDecorator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||