Package oracle.spatial.network
Interface TreeNode
-
- All Superinterfaces:
java.lang.Cloneable,java.lang.Comparable,java.io.Serializable
public interface TreeNode extends java.lang.Cloneable, java.io.Serializable, java.lang.ComparableThis interface defines a tree node for trace-out. The nodes of the tree can either be network nodes or virtual nodes on network links.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChildNode(TreeLink tLink, TreeNode tNode)Adds a child tree node to current tree nodeTreeNode[]getChildNodeArray()Returns the child tree node in an arraydoublegetCost()Returns the cost from root nodeintgetDepth()Returns the depth of the node form root.doublegetDuration()Returns the sum of duration from root to this tree nodeJGeometrygetGeometry()Returns the geometry of the tree nodeLinkgetLink()Returns the link and percentage on the link if the tree node is a node on the link isNodeOnLink() == trueNodegetNode()If the node is a regular node (not a node on a link)TreeNodegetParentNode()Returns the parent tree nodedoublegetPercentage()Returns the link and percentage on the link if the tree node is a node on the link isNodeOnLink() == trueTreeLinkgetTreeLink()Returns the tree link that leads to this tree nodebooleanisLeafNode()Returns the tree link array that leads to the child nodes i-th tree link leads to i-th child tree node public TreeLink getTreeLink() ; /** Is the node a leaf node?booleanisNodeOnLink()Check whether this node is on a link.booleanisRegularNode()Returns the regular node if the tree node is a regular node isNodeOnLink() == false
-
-
-
Method Detail
-
getParentNode
TreeNode getParentNode()
Returns the parent tree node
-
getChildNodeArray
TreeNode[] getChildNodeArray()
Returns the child tree node in an array
-
isLeafNode
boolean isLeafNode()
Returns the tree link array that leads to the child nodes i-th tree link leads to i-th child tree node public TreeLink getTreeLink() ; /** Is the node a leaf node?
-
isNodeOnLink
boolean isNodeOnLink()
Check whether this node is on a link. A tree node can either be a regular node or a node on a link
-
isRegularNode
boolean isRegularNode()
Returns the regular node if the tree node is a regular node isNodeOnLink() == false
-
getNode
Node getNode()
If the node is a regular node (not a node on a link)
-
getLink
Link getLink()
Returns the link and percentage on the link if the tree node is a node on the link isNodeOnLink() == true
-
getPercentage
double getPercentage()
Returns the link and percentage on the link if the tree node is a node on the link isNodeOnLink() == true
-
addChildNode
void addChildNode(TreeLink tLink, TreeNode tNode)
Adds a child tree node to current tree node
-
getDepth
int getDepth()
Returns the depth of the node form root. Root has depth 0
-
getCost
double getCost()
Returns the cost from root node
-
getTreeLink
TreeLink getTreeLink()
Returns the tree link that leads to this tree node
-
getGeometry
JGeometry getGeometry()
Returns the geometry of the tree node
-
getDuration
double getDuration()
Returns the sum of duration from root to this tree node- Returns:
- sum of duration
-
-