|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IBasicGraph<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
Method Summary | |
---|---|
boolean |
containsConnection(IBasicPair<? extends N,? extends E> ends)
Tests if the graph has an edge between the defined ends. |
boolean |
containsConnection(N thisNode,
N thatNode)
Tests if the graph contains an edge connecting these nodes. |
boolean |
containsEdge(E edge)
Tests if the graph contains the edge. |
boolean |
containsEdge(int edgeIdx)
Tests if the graph contains the edge of the given index. |
boolean |
containsNode(int nodeIdx)
Tests if the graph contains the node with the given index number. |
boolean |
containsNode(N node)
Tests if this node exists in the graph. |
java.util.Iterator<E> |
edgeIterator()
Get an iterator that traverses all the edges in this graph. |
E |
getEdge(int edgeIdx)
Get the edge with this index. |
N |
getNode(int nodeIdx)
Get the node matching the nodeIdx. |
int |
getNumEdges()
Get the number of edges in the graph. |
int |
getNumNodes()
Get the number of nodes in the graph. |
java.util.Iterator<N> |
nodeIterator()
Get an iterator that traverses all the nodes in this graph. |
Method Detail |
---|
int getNumNodes()
int getNumEdges()
boolean containsNode(int nodeIdx)
nodeIdx
- The index number of the node.
N getNode(int nodeIdx)
nodeIdx
- the node index to lookup.
java.lang.IllegalArgumentException
- if node does not exists, i.e. containsNode(nodeIdx) == false
boolean containsNode(N node)
node
- to be tested.
boolean containsConnection(N thisNode, N thatNode)
thisNode
- a node to test.thatNode
- the other node to test.
boolean containsEdge(E edge)
edge
- the edge to test.
boolean containsConnection(IBasicPair<? extends N,? extends E> ends)
ends
- the ends of the edge to test.
boolean containsEdge(int edgeIdx)
edgeIdx
- the index to test.
E getEdge(int edgeIdx)
edgeIdx
- The index of the edge.
java.lang.IllegalArgumentException
- if an edge matching this index does not exist, i.e. containsEdge(edgeIdx) == false
.java.util.Iterator<N> nodeIterator()
java.util.Iterator<E> edgeIterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |