Module org.apache.lucene.core
Package org.apache.lucene.document
Class ShapeDocValues.ShapeComparator
- java.lang.Object
-
- org.apache.lucene.document.ShapeDocValues.ShapeComparator
-
- Enclosing class:
- ShapeDocValues
private final class ShapeDocValues.ShapeComparator extends java.lang.Object
Shape Comparator class provides tree traversal relation methods
-
-
Field Summary
Fields Modifier and Type Field Description private SpatialQuery.EncodedRectangle
boundingBox
private int
centroidX
private int
centroidY
private ShapeDocValues.Reader
dvReader
private ShapeDocValues.Encoder
encoder
private ShapeField.DecodedTriangle.TYPE
highestDimension
private int
numberOfTerms
private byte
version
-
Constructor Summary
Constructors Constructor Description ShapeComparator(BytesRef binaryValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
getCentroidX()
private int
getCentroidY()
ShapeField.DecodedTriangle.TYPE
getHighestDimension()
private int
getMaxX()
private int
getMaxY()
private int
getMinX()
private int
getMinY()
private int
numberOfTerms()
PointValues.Relation
relate(Component2D query)
Computes a query component relation with the doc value shape; main entry point to the root of the binary treeprivate PointValues.Relation
relate(Component2D queryComponent2D, boolean splitX, int pMaxX, int pMaxY, int nodeSize)
recursive traversal method recurses through tree nodes to compute relation with the query componentprivate PointValues.Relation
relateComponent(ShapeField.DecodedTriangle.TYPE type, SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double x, Component2D queryComponent2D)
relates the component based on type (POINT, LINE, TRIANGLE)private PointValues.Relation
relateLine(SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double ax, Component2D query)
private PointValues.Relation
relatePoint(SpatialQuery.EncodedRectangle bbox, int pMaxY, double ax, Component2D query)
private PointValues.Relation
relateTriangle(SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double ax, Component2D queryComponent2D)
private void
skipCentroid()
private void
skipHighestDimension()
-
-
-
Field Detail
-
dvReader
private ShapeDocValues.Reader dvReader
-
encoder
private final ShapeDocValues.Encoder encoder
-
version
private final byte version
-
numberOfTerms
private final int numberOfTerms
-
boundingBox
private final SpatialQuery.EncodedRectangle boundingBox
-
centroidX
private final int centroidX
-
centroidY
private final int centroidY
-
highestDimension
private final ShapeField.DecodedTriangle.TYPE highestDimension
-
-
Constructor Detail
-
ShapeComparator
ShapeComparator(BytesRef binaryValue) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
numberOfTerms
private int numberOfTerms()
-
getMinX
private int getMinX()
-
getMinY
private int getMinY()
-
getMaxX
private int getMaxX()
-
getMaxY
private int getMaxY()
-
getHighestDimension
public ShapeField.DecodedTriangle.TYPE getHighestDimension()
-
getCentroidX
private int getCentroidX()
-
getCentroidY
private int getCentroidY()
-
skipCentroid
private void skipCentroid() throws java.io.IOException
- Throws:
java.io.IOException
-
skipHighestDimension
private void skipHighestDimension() throws java.io.IOException
- Throws:
java.io.IOException
-
relate
public PointValues.Relation relate(Component2D query) throws java.io.IOException
Computes a query component relation with the doc value shape; main entry point to the root of the binary tree- Throws:
java.io.IOException
-
relate
private PointValues.Relation relate(Component2D queryComponent2D, boolean splitX, int pMaxX, int pMaxY, int nodeSize) throws java.io.IOException
recursive traversal method recurses through tree nodes to compute relation with the query component- Throws:
java.io.IOException
-
relateComponent
private PointValues.Relation relateComponent(ShapeField.DecodedTriangle.TYPE type, SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double x, Component2D queryComponent2D) throws java.io.IOException
relates the component based on type (POINT, LINE, TRIANGLE)- Throws:
java.io.IOException
-
relatePoint
private PointValues.Relation relatePoint(SpatialQuery.EncodedRectangle bbox, int pMaxY, double ax, Component2D query) throws java.io.IOException
- Throws:
java.io.IOException
-
relateLine
private PointValues.Relation relateLine(SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double ax, Component2D query) throws java.io.IOException
- Throws:
java.io.IOException
-
relateTriangle
private PointValues.Relation relateTriangle(SpatialQuery.EncodedRectangle bbox, int pMaxX, int pMaxY, double ax, Component2D queryComponent2D) throws java.io.IOException
- Throws:
java.io.IOException
-
-