|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.graph.structure.opt.OptGraphable
org.geotools.graph.structure.opt.OptDirectedNode
Optimized implementation of DirectedNode. The following optimizations
reduce space and increase performance.
DirectedNode,
Serialized Form| Nested Class Summary | |
class |
OptDirectedNode.RelatedIterator
Iterator used to iterate over related nodes. |
| Constructor Summary | |
OptDirectedNode()
Constructs a new OptDirectedNode. |
|
OptDirectedNode(int indegree,
int outdegree)
Constructs a new OptDirectedNode. |
|
| Method Summary | |
void |
add(Edge e)
Not supported. |
void |
addIn(DirectedEdge e)
Adds an edge to the in adjacency list of the node. |
void |
addOut(DirectedEdge e)
Adds an edge to the out adjacency list of the node. |
int |
getDegree()
Returns the degree of the node. |
Edge |
getEdge(Node other)
Returns an edge in the adjacency list of the node that is adjacent to another specified node. |
java.util.List |
getEdges()
Returns the edge adjacency list of the node. |
java.util.List |
getEdges(Node other)
Returns a collection of edges in the adjacency list of the node that are adjacent to another specified node. |
int |
getInDegree()
Returns the in degree of the node. |
Edge |
getInEdge(DirectedNode other)
Returns an edge that terminates at the node and originates from a specified node. |
DirectedEdge[] |
getInEdgeArray()
Returns the in adjacency edge array of the node. |
java.util.List |
getInEdges()
Returns the in adjacency list of the node. |
java.util.List |
getInEdges(DirectedNode other)
Returns all edges that terminate at the node and originate from a specified node. |
java.util.Iterator |
getInRelated()
This iterator iterates over the underlying in edge array of the node. |
int |
getOutDegree()
Returns the out degree of the node. |
Edge |
getOutEdge(DirectedNode other)
Returns an edge that originates at the node and terminates at a specified node. |
DirectedEdge[] |
getOutEdgeArray()
Returns the out adjacency edge array of the node. |
java.util.List |
getOutEdges()
Returns the out adjacency list of the node. |
java.util.List |
getOutEdges(DirectedNode other)
Returns all edges that originate at the node and terminate from at specified node. |
java.util.Iterator |
getOutRelated()
This iterator iterates over the underlying out edge array of the node. |
java.util.Iterator |
getRelated()
This iterator iterates over the underlying edge arrays of the node. |
void |
remove(Edge e)
Unsupported Operation. |
void |
removeIn(DirectedEdge e)
Unsupported Operation. |
void |
removeOut(DirectedEdge e)
Unsupported Operation. |
void |
setInDegree(int indegree)
Sets the in degree of the node. |
void |
setOutDegree(int outdegree)
Sets the out degree of the node. |
| Methods inherited from class org.geotools.graph.structure.opt.OptGraphable |
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.geotools.graph.structure.Graphable |
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited |
| Constructor Detail |
public OptDirectedNode()
public OptDirectedNode(int indegree,
int outdegree)
indegree - Number of in adjacenct edges to the node.outdegree - Number of out adjacent edges to the node.| Method Detail |
public void add(Edge e)
add in interface Nodee - Adjacent edge to add.
java.lang.UnsupportedOperationExceptionpublic void addIn(DirectedEdge e)
DirectedNode
addIn in interface DirectedNodee - A directed edge that terminates at the node.DirectedNode.addIn(DirectedEdge)public void addOut(DirectedEdge e)
DirectedNode
addOut in interface DirectedNodee - A directed edge that originates from the node.DirectedNode.addOut(DirectedEdge)public void remove(Edge e)
remove in interface Nodee - Adjacent edge to remove.
java.lang.UnsupportedOperationExceptionpublic void removeIn(DirectedEdge e)
removeIn in interface DirectedNodee - A directed edge that terminates at the node.
java.lang.UnsupportedOperationExceptionNode.remove(Edge)public void removeOut(DirectedEdge e)
removeOut in interface DirectedNodee - A directed edge that originates from the node.
java.lang.UnsupportedOperationExceptionNode.remove(Edge)public Edge getEdge(Node other)
Node
getEdge in interface Nodeother - The other node that the desired edge to return is adjacent to.
Node.getEdge(Node)public Edge getInEdge(DirectedNode other)
DirectedNode
getInEdge in interface DirectedNodeother - The originating node.
DirectedNode.getInEdge(DirectedNode)public Edge getOutEdge(DirectedNode other)
DirectedNode
getOutEdge in interface DirectedNodeother - The terminating node.
DirectedNode.getOutEdge(DirectedNode)public java.util.List getEdges(Node other)
Node
getEdges in interface Nodeother - The other node that the desired edges to return are
adjacent to.
Node.getEdges(Node)public java.util.List getInEdges(DirectedNode other)
DirectedNode
getInEdges in interface DirectedNodeother - The originating node.
DirectedNode.getInEdges(DirectedNode)public java.util.List getOutEdges(DirectedNode other)
DirectedNode
getOutEdges in interface DirectedNodeother - The temimnating node.
DirectedNode.getOutEdges(DirectedNode)public java.util.List getEdges()
Node
getEdges in interface NodeNode.getEdges()public DirectedEdge[] getInEdgeArray()
public java.util.List getInEdges()
DirectedNode
getInEdges in interface DirectedNodeDirectedNode.getInEdges()public DirectedEdge[] getOutEdgeArray()
public java.util.List getOutEdges()
DirectedNode
getOutEdges in interface DirectedNodeDirectedNode.getOutEdges()public int getDegree()
Node
getDegree in interface NodeNode.getDegree()public void setInDegree(int indegree)
indegree - The in degree / size of in edge array of the node.public int getInDegree()
DirectedNode
getInDegree in interface DirectedNodeDirectedNode.getInDegree()public void setOutDegree(int outdegree)
public int getOutDegree()
DirectedNode
getOutDegree in interface DirectedNodeDirectedNode.getOutDegree()public java.util.Iterator getRelated()
getRelated in interface GraphableGraphable.getRelated()public java.util.Iterator getInRelated()
getInRelated in interface DirectedGraphableDirectedGraphable.getInRelated()public java.util.Iterator getOutRelated()
getOutRelated in interface DirectedGraphableGraphable.getRelated()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||