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
This method never returns null . |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ExtensionGraph(NumberedGraph<T> original)
public int getNumberOfNodes()
getNumberOfNodes
in interface NodeManager<T>
public void addNode(T n)
NodeManager
addNode
in interface NodeManager<T>
public void removeNode(T n) throws UnsupportedOperationException
NodeManager
removeNode
in interface NodeManager<T>
UnsupportedOperationException
public 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)
EdgeManager
Iterator
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)
EdgeManager
immediate predecessor
nodes of ngetPredNodeCount
in interface EdgeManager<T>
public IntSet getPredNodeNumbers(T node)
getPredNodeNumbers
in interface NumberedEdgeManager<T>
public Iterator<T> getSuccNodes(T n)
EdgeManager
This method never returns null
.
getSuccNodes
in interface EdgeManager<T>
public int getSuccNodeCount(T N)
EdgeManager
immediate 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>
UnsupportedOperationException
public void removeAllIncidentEdges(T node) throws UnsupportedOperationException
removeAllIncidentEdges
in interface EdgeManager<T>
UnsupportedOperationException
public void removeIncomingEdges(T node) throws UnsupportedOperationException
removeIncomingEdges
in interface EdgeManager<T>
UnsupportedOperationException
public void removeOutgoingEdges(T node) throws UnsupportedOperationException
removeOutgoingEdges
in interface EdgeManager<T>
UnsupportedOperationException
public boolean hasEdge(T src, T dst)
hasEdge
in interface EdgeManager<T>
public void removeNodeAndEdges(T n) throws UnsupportedOperationException
Graph
removeNodeAndEdges
in interface Graph<T>
UnsupportedOperationException
- if the graph implementation does not allow removal