| |
|
| java.lang.Object org.geotools.graph.structure.opt.OptGraphable org.geotools.graph.structure.opt.OptNode
All known Subclasses: org.geotools.graph.structure.line.OptXYNode,
OptNode | public class OptNode extends OptGraphable implements Node(Code) | | Optimized implementation of Node. The following optimizations reduce space
and improve performance.
- Edge adjacency list stored as array of predetermined size.
- Removing support for removing edges from the nodes ajdacency list.
- The related component iterator iterates over the underlying edge
array of the node instread of a newly created collection.
Using an optimized node requires that the degree of the node be known before
the node is built.
author: Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net See Also: Node |
Inner Class :public class RelatedIterator implements Iterator | |
Constructor Summary | |
public | OptNode() Constructs a new OptimizedNode. | public | OptNode(int degree) Constructs a new Optimized Node with a known degree. |
OptNode | public OptNode()(Code) | | Constructs a new OptimizedNode. This constructor does not build the
adjacency array for the node.
|
OptNode | public OptNode(int degree)(Code) | | Constructs a new Optimized Node with a known degree.
Parameters: degree - The degree of the node. |
getEdgeArray | public Edge[] getEdgeArray()(Code) | | Returns the edge adjacency list of the node as an array.
An array containing edges adjacent to the node. |
setDegree | public void setDegree(int degree)(Code) | | Sets the degree of the node. This method build the edge adjacency array
for the node.
Parameters: degree - The degree of the node / size of edge adjacency array. |
|
|
|