public class ExtensionGraph<T> extends Object implements NumberedGraph<T>
| Constructor and Description |
|---|
ExtensionGraph(NumberedGraph<T> original) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(T src,
T dst) |
void |
addNode(T n)
add a node to this graph
|
boolean |
containsNode(T n) |
int |
getMaxNumber() |
T |
getNode(int number) |
int |
getNumber(T N) |
int |
getNumberOfNodes() |
int |
getPredNodeCount(T n)
Return the number of
immediate predecessor nodes of n |
IntSet |
getPredNodeNumbers(T node) |
Iterator<T> |
getPredNodes(T n)
Return an
Iterator over the immediate predecessor nodes of n |
int |
getSuccNodeCount(T N)
Return the number of
immediate successor nodes of this Node in the Graph |
IntSet |
getSuccNodeNumbers(T node) |
Iterator<T> |
getSuccNodes(T n)
Return an Iterator over the immediate successor nodes of n
|
boolean |
hasEdge(T src,
T dst) |
Iterator<T> |
iterateNodes(IntSet s) |
Iterator<T> |
iterator() |
void |
removeAllIncidentEdges(T node) |
void |
removeEdge(T src,
T dst) |
void |
removeIncomingEdges(T node) |
void |
removeNode(T n)
remove a node from this graph
|
void |
removeNodeAndEdges(T n)
remove a node and all its incident edges
|
void |
removeOutgoingEdges(T node) |
Stream<T> |
stream() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ExtensionGraph(NumberedGraph<T> original)
public Stream<T> stream()
stream in interface NodeManager<T>Stream of the nodes in this graphpublic int getNumberOfNodes()
getNumberOfNodes in interface NodeManager<T>public void addNode(T n)
NodeManageraddNode in interface NodeManager<T>public void removeNode(T n) throws UnsupportedOperationException
NodeManagerremoveNode in interface NodeManager<T>UnsupportedOperationExceptionpublic boolean containsNode(T n)
containsNode in interface NodeManager<T>public int getNumber(T N)
getNumber in interface NumberedNodeManager<T>public T getNode(int number)
getNode in interface NumberedNodeManager<T>public int getMaxNumber()
getMaxNumber in interface NumberedNodeManager<T>public Iterator<T> iterateNodes(IntSet s)
iterateNodes in interface NumberedNodeManager<T>public Iterator<T> getPredNodes(T n)
EdgeManagerIterator over the immediate predecessor nodes of n
This method never returns null.
getPredNodes in interface EdgeManager<T>Iterator over the immediate predecessor nodes of this Node.public int getPredNodeCount(T n)
EdgeManagerimmediate predecessor nodes of ngetPredNodeCount in interface EdgeManager<T>public IntSet getPredNodeNumbers(T node)
getPredNodeNumbers in interface NumberedEdgeManager<T>public Iterator<T> getSuccNodes(T n)
EdgeManagerThis method never returns null.
getSuccNodes in interface EdgeManager<T>public int getSuccNodeCount(T N)
EdgeManagerimmediate successor nodes of this Node in the GraphgetSuccNodeCount in interface EdgeManager<T>public IntSet getSuccNodeNumbers(T node)
getSuccNodeNumbers in interface NumberedEdgeManager<T>public void addEdge(T src, T dst)
addEdge in interface EdgeManager<T>public void removeEdge(T src, T dst) throws UnsupportedOperationException
removeEdge in interface EdgeManager<T>UnsupportedOperationExceptionpublic void removeAllIncidentEdges(T node) throws UnsupportedOperationException
removeAllIncidentEdges in interface EdgeManager<T>UnsupportedOperationExceptionpublic void removeIncomingEdges(T node) throws UnsupportedOperationException
removeIncomingEdges in interface EdgeManager<T>UnsupportedOperationExceptionpublic void removeOutgoingEdges(T node) throws UnsupportedOperationException
removeOutgoingEdges in interface EdgeManager<T>UnsupportedOperationExceptionpublic boolean hasEdge(T src, T dst)
hasEdge in interface EdgeManager<T>public void removeNodeAndEdges(T n) throws UnsupportedOperationException
GraphremoveNodeAndEdges in interface Graph<T>UnsupportedOperationException - if the graph implementation does not allow removal