T - type of node in the graphpublic class BasicOrderedMultiGraph<T> extends Object implements OrderedMultiGraph<T>
UNDER CONSTRUCTION.
| Constructor and Description |
|---|
BasicOrderedMultiGraph() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(int i,
T src,
T dst)
add an edge and record it so dst is the ith successor of src
|
void |
addEdge(T src,
T dst)
Add this edge, unconditionally setting it as the next successor.
|
void |
addNode(T n)
add a node to this graph
|
boolean |
containsNode(T N) |
int |
getNumberOfNodes() |
int |
getPredNodeCount(T N)
Return the number of
immediate predecessor nodes of n |
Iterator<T> |
getPredNodes(T N)
For now, this returns nodes in no particular order! Fix this when needed.
|
T |
getSuccessor(T node,
int i)
get the ith successor of a node
|
int |
getSuccNodeCount(T N)
Return the number of
immediate successor nodes of this Node in the Graph |
Iterator<T> |
getSuccNodes(T N)
Return an Iterator over the immediate successor nodes of n
|
boolean |
hasEdge(T src,
T dst) |
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 void addEdge(T src, T dst) throws IllegalArgumentException
addEdge in interface EdgeManager<T>IllegalArgumentExceptionpublic void addEdge(int i,
T src,
T dst)
throws IllegalArgumentException
OrderedMultiGraphaddEdge in interface OrderedMultiGraph<T>IllegalArgumentExceptionpublic void addNode(T n)
NodeManageraddNode in interface NodeManager<T>public boolean containsNode(T N)
containsNode in interface NodeManager<T>public int getNumberOfNodes()
getNumberOfNodes in interface NodeManager<T>public int getPredNodeCount(T N) throws IllegalArgumentException
EdgeManagerimmediate predecessor nodes of ngetPredNodeCount in interface EdgeManager<T>IllegalArgumentExceptionpublic Iterator<T> getPredNodes(T N) throws IllegalArgumentException
getPredNodes in interface EdgeManager<T>Iterator over the immediate predecessor nodes of this Node.IllegalArgumentExceptionpublic int getSuccNodeCount(T N) throws IllegalArgumentException
EdgeManagerimmediate successor nodes of this Node in the GraphgetSuccNodeCount in interface EdgeManager<T>IllegalArgumentExceptionpublic Iterator<T> getSuccNodes(T N) throws IllegalArgumentException
EdgeManagerThis method never returns null.
getSuccNodes in interface EdgeManager<T>IllegalArgumentExceptionpublic boolean hasEdge(T src, T dst)
hasEdge in interface EdgeManager<T>public Stream<T> stream()
stream in interface NodeManager<T>Stream of the nodes in this graphpublic void removeAllIncidentEdges(T node) throws UnimplementedError
removeAllIncidentEdges in interface EdgeManager<T>UnimplementedErrorpublic void removeEdge(T src, T dst) throws UnimplementedError
removeEdge in interface EdgeManager<T>UnimplementedErrorpublic void removeIncomingEdges(T node) throws UnimplementedError
removeIncomingEdges in interface EdgeManager<T>UnimplementedErrorpublic void removeNode(T n) throws UnimplementedError
NodeManagerremoveNode in interface NodeManager<T>UnimplementedErrorpublic void removeNodeAndEdges(T N) throws UnimplementedError
GraphremoveNodeAndEdges in interface Graph<T>UnimplementedErrorpublic void removeOutgoingEdges(T node) throws UnimplementedError
removeOutgoingEdges in interface EdgeManager<T>UnimplementedErrorpublic T getSuccessor(T node, int i) throws IllegalArgumentException
OrderedMultiGraphgetSuccessor in interface OrderedMultiGraph<T>IllegalArgumentException