|
|||||||||||
| 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.OptNode
Optimized implementation of Node. The following optimizations reduce space
and improve performance.
Node,
Serialized Form| Nested Class Summary | |
class |
OptNode.RelatedIterator
An iterator used to iterate over related nodes. |
| Constructor Summary | |
OptNode()
Constructs a new OptimizedNode. |
|
OptNode(int degree)
Constructs a new Optimized Node with a known degree. |
|
| Method Summary | |
void |
add(Edge e)
Adds an edge to the 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. |
Edge[] |
getEdgeArray()
Returns the edge adjacency list of the node as an array. |
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. |
java.util.Iterator |
getRelated()
This iterator iterates over the underlying edge array of the node. |
void |
remove(Edge e)
Not supported. |
void |
setDegree(int degree)
Sets the 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 OptNode()
public OptNode(int degree)
degree - The degree of the node.| Method Detail |
public void add(Edge e)
Node
add in interface Nodee - Adjacent edge to add.Node.add(Edge)public void remove(Edge e)
remove in interface Nodee - Adjacent edge to remove.
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 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 Edge[] getEdgeArray()
public java.util.List getEdges()
Node
getEdges in interface NodeNode.getEdges()public void setDegree(int degree)
degree - The degree of the node / size of edge adjacency array.public int getDegree()
Node
getDegree in interface NodeNode.getDegree()public java.util.Iterator getRelated()
getRelated in interface GraphableGraphable.getRelated()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||