|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javautils.graph.GraphDecorator | +--javautils.graph.AnAugmentedGraph
An augmented version of an original Graph
-instance. Because
this class is final, it is safe to access the original graph which is
simply the unaugmented version of the graph.
Method Summary | |
java.util.List |
edgesTo(java.lang.Object node)
List of all edges to the specified target node. |
static AugmentedGraph |
from(Graph graph)
An augmented version of the graph. |
boolean |
isNode(java.lang.Object obj)
True if and only if the object is a node of this graph. |
Graph |
original()
The original, unaugmented, graph. |
Methods inherited from class javautils.graph.GraphDecorator |
edgesFrom, graph, nodes, sourceOf, targetOf |
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 |
edgesFrom, nodes, sourceOf, targetOf |
Method Detail |
public static AugmentedGraph from(Graph graph)
An augmented version of the graph. If the graph is already augmented, the same graph will be returned.
public boolean isNode(java.lang.Object obj)
AugmentedGraph
True if and only if the object is a node of this graph.
isNode
in interface AugmentedGraph
public java.util.List edgesTo(java.lang.Object node)
AugmentedGraph
List 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 AugmentedGraph
public Graph original()
The original, unaugmented, graph.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |