|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
IndexedDigraph adds index methods to a Digraph. These methods will in general throw an ArrayIndexOutOfBoundsException if there's no node at a given index. If you know the index should be fine, consider catching it and throwing a ConcurrentModificationException.
Method Summary | |
boolean |
containsEdge(int fromIndex,
int toIndex)
|
boolean |
containsNode(int index)
|
int |
countInboundEdges(int index)
|
int |
countOutboundEdges(int index)
|
int[] |
getFromIndices(int index)
|
java.util.Set |
getFromNodes(int index)
|
java.lang.Object |
getNode(int index)
|
int |
getNodeIndex(java.lang.Object node)
|
int[] |
getToIndices(int index)
|
java.util.Set |
getToNodes(int index)
|
IndexedEdgeNodeIterator |
indexedEdgeNodeIterator()
|
IndexedIterator |
indexedNodeIterator()
|
int |
nodeCapacity()
Returns the maximum capacity for nodes in this IndexedDigraph. |
int[] |
nodeIndices()
Returns an array if ints that show which node indices are being used. |
Methods inherited from interface net.walend.digraph.Digraph |
containsEdge, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getFromNodes, getNodes, getToNodes, isEdgeFree, isEmpty, nodeCount, nodeIterator |
Methods inherited from interface net.walend.collection.HasState |
getPrincipleInterface, sameStateAs |
Method Detail |
public int nodeCapacity()
public int[] nodeIndices()
public boolean containsNode(int index)
java.lang.ArrayIndexOutOfBoundsException
- if index does not have a node. Use nodeIndices() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.public java.lang.Object getNode(int index)
java.lang.ArrayIndexOutOfBoundsException
- if index does not have a node. Use nodeIndices() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.public int getNodeIndex(java.lang.Object node) throws NodeMissingException
a
- NodeMissingException if the node is not in the digraph.
NodeMissingException
public boolean containsEdge(int fromIndex, int toIndex)
java.lang.ArrayIndexOutOfBoundsException
- if index does not have a node. Use nodeIndices() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.public int countInboundEdges(int index)
java.lang.ArrayIndexOutOfBoundsException
- if index does not have a node. Use nodeIndices() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.public int countOutboundEdges(int index)
java.lang.ArrayIndexOutOfBoundsException
- if index does not have a node. Use nodeIndices() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.public java.util.Set getFromNodes(int index)
java.lang.ArrayIndexOutOfBoundsException
- if index does not have a node. Use nodeIndices() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.public int[] getFromIndices(int index)
public java.util.Set getToNodes(int index)
java.lang.ArrayIndexOutOfBoundsException
- if index does not have a node. Use nodeIndices() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.public int[] getToIndices(int index)
public IndexedEdgeNodeIterator indexedEdgeNodeIterator()
public IndexedIterator indexedNodeIterator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |