Package oracle.spatial.network
Interface Tree
-
- All Superinterfaces:
java.lang.Cloneable,java.io.Serializable
public interface Tree extends java.lang.Cloneable, java.io.SerializableThis interface defines a tree 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 TreeNode[]bestFirstSearch()Best First Search based on costTreeNode[]breadthFirstSearch()Breadth First Searchvoidclear()Clears the tree structurebooleancontainsPartialLinks()Does the tree contain particial links?TreeNode[]depthFirstSearch()Depth First SearchTreeNodeget(Node node)Returns the tree node that contains the given network nodeTreeNode[]getLeafNodeArray()Returns leaf nodes in an arrayTreeNodegetRootNode()Returns the root nodeSubPathgetSubPath(TreeNode treeNode)Returns the subpath between the given tree node and the root nodebooleanisForward()Returns the traverse directionbooleanisLogical()Checks if the tree is logicalintsize()Returns number of tree nodes
-
-
-
Method Detail
-
getRootNode
TreeNode getRootNode()
Returns the root node
-
containsPartialLinks
boolean containsPartialLinks()
Does the tree contain particial links?
-
clear
void clear()
Clears the tree structure
-
depthFirstSearch
TreeNode[] depthFirstSearch()
Depth First Search
-
breadthFirstSearch
TreeNode[] breadthFirstSearch()
Breadth First Search
-
bestFirstSearch
TreeNode[] bestFirstSearch()
Best First Search based on cost
-
getLeafNodeArray
TreeNode[] getLeafNodeArray()
Returns leaf nodes in an array
-
isLogical
boolean isLogical()
Checks if the tree is logical- Returns:
- true if logical tree, false if it is a spatial tree
-
get
TreeNode get(Node node)
Returns the tree node that contains the given network node- Parameters:
node- given network node- Returns:
- tree node that contains the given network node, null if node not in the tree
-
size
int size()
Returns number of tree nodes- Returns:
- no of tree nodes
-
isForward
boolean isForward()
Returns the traverse direction- Returns:
- true if the traverse direction is forward (starting from rott), false otherwise
-
getSubPath
SubPath getSubPath(TreeNode treeNode) throws NetworkDataException
Returns the subpath between the given tree node and the root node- Parameters:
treeNode- the given tree node in the tree- Returns:
- subpath between the tree node and the root node
- Throws:
NetworkDataException
-
-