Module org.apache.lucene.spatial3d
Package org.apache.lucene.spatial3d.geom
Class GeoComplexPolygon.Tree
java.lang.Object
org.apache.lucene.spatial3d.geom.GeoComplexPolygon.Tree
- Direct Known Subclasses:
GeoComplexPolygon.XTree,GeoComplexPolygon.YTree,GeoComplexPolygon.ZTree
- Enclosing class:
GeoComplexPolygon
An interface describing a tree.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static GeoComplexPolygon.NodecreateTree(GeoComplexPolygon.Node[] edges, int low, int high) protected abstract doubleGet the maximum value from the edge.protected abstract doubleGet the minimum value from the edge.booleantraverse(GeoComplexPolygon.EdgeIterator edgeIterator, double value) Traverse the tree, finding all edges that intersect the provided value.booleantraverse(GeoComplexPolygon.EdgeIterator edgeIterator, double minValue, double maxValue) Traverse the tree, finding all edges that intersect the provided value range.
-
Field Details
-
rootNode
-
-
Constructor Details
-
Tree
Constructor.- Parameters:
allEdges- is the list of all edges for the tree.
-
-
Method Details
-
createTree
-
getMinimum
Get the minimum value from the edge.- Parameters:
edge- is the edge.- Returns:
- the minimum value.
-
getMaximum
Get the maximum value from the edge.- Parameters:
edge- is the edge.- Returns:
- the maximum value.
-
traverse
Traverse the tree, finding all edges that intersect the provided value.- Parameters:
edgeIterator- provides the method to call for any encountered matching edge.value- is the value to match.- Returns:
- false if the traversal was aborted before completion.
-
traverse
public boolean traverse(GeoComplexPolygon.EdgeIterator edgeIterator, double minValue, double maxValue) Traverse the tree, finding all edges that intersect the provided value range.- Parameters:
edgeIterator- provides the method to call for any encountered matching edge. Edges will not be invoked more than once.minValue- is the minimum value.maxValue- is the maximum value.- Returns:
- false if the traversal was aborted before completion.
-