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

private abstract static class GeoComplexPolygon.Tree extends Object
An interface describing a tree.
  • Field Details

  • Constructor Details

    • Tree

      public Tree(List<GeoComplexPolygon.Edge> allEdges)
      Constructor.
      Parameters:
      allEdges - is the list of all edges for the tree.
  • Method Details

    • createTree

      private static GeoComplexPolygon.Node createTree(GeoComplexPolygon.Node[] edges, int low, int high)
    • getMinimum

      protected abstract double getMinimum(GeoComplexPolygon.Edge edge)
      Get the minimum value from the edge.
      Parameters:
      edge - is the edge.
      Returns:
      the minimum value.
    • getMaximum

      protected abstract double getMaximum(GeoComplexPolygon.Edge edge)
      Get the maximum value from the edge.
      Parameters:
      edge - is the edge.
      Returns:
      the maximum value.
    • traverse

      public boolean traverse(GeoComplexPolygon.EdgeIterator edgeIterator, double value)
      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.