public class HashReversibleGraph extends HashMutableDirectedGraph implements ReversibleGraph
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
reversed |
heads, nodeToPreds, nodeToSuccs, tails| Constructor and Description |
|---|
HashReversibleGraph() |
HashReversibleGraph(DirectedGraph dg) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(java.lang.Object from,
java.lang.Object to)
Adds an edge to the graph between 2 nodes.
|
boolean |
containsEdge(java.lang.Object from,
java.lang.Object to) |
java.util.List |
getHeads()
Returns a list of entry points for this graph.
|
java.util.List |
getPredsOf(java.lang.Object s)
Returns a list of predecessors for the given node in the graph.
|
java.util.List |
getSuccsOf(java.lang.Object s)
Returns a list of successors for the given node in the graph.
|
java.util.List |
getTails()
Returns a list of exit points for this graph.
|
boolean |
isReversed()
Returns true if the graph is now reversed from its original state
at creation.
|
void |
removeEdge(java.lang.Object from,
java.lang.Object to)
Removes an edge between 2 nodes in the graph.
|
ReversibleGraph |
reverse()
Reverse the edges of the current graph and swap head and tail
nodes.
|
addNode, clearAll, clone, containsNode, getNodes, getPredsOfAsSet, getSuccsOfAsSet, iterator, printGraph, removeNode, sizeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddNode, containsNode, getNodes, removeNodeiterator, sizepublic HashReversibleGraph(DirectedGraph dg)
public HashReversibleGraph()
public boolean isReversed()
ReversibleGraphisReversed in interface ReversibleGraphpublic ReversibleGraph reverse()
ReversibleGraphreverse in interface ReversibleGraphpublic void addEdge(java.lang.Object from,
java.lang.Object to)
MutableDirectedGraphaddEdge in interface MutableDirectedGraphaddEdge in class HashMutableDirectedGraphfrom - out node for the edge.to - in node for the edge.public void removeEdge(java.lang.Object from,
java.lang.Object to)
MutableDirectedGraphremoveEdge in interface MutableDirectedGraphremoveEdge in class HashMutableDirectedGraphfrom - out node for the edge to remove.to - in node for the edge to remove.public boolean containsEdge(java.lang.Object from,
java.lang.Object to)
containsEdge in interface MutableDirectedGraphcontainsEdge in class HashMutableDirectedGraphpublic java.util.List getHeads()
DirectedGraphgetHeads in interface DirectedGraphgetHeads in class HashMutableDirectedGraphpublic java.util.List getTails()
DirectedGraphgetTails in interface DirectedGraphgetTails in class HashMutableDirectedGraphpublic java.util.List getPredsOf(java.lang.Object s)
DirectedGraphgetPredsOf in interface DirectedGraphgetPredsOf in class HashMutableDirectedGraphpublic java.util.List getSuccsOf(java.lang.Object s)
DirectedGraphgetSuccsOf in interface DirectedGraphgetSuccsOf in class HashMutableDirectedGraphCopyright © 2012-2019 RoboVM AB. All Rights Reserved.