Package org.apache.lucene.sandbox.search
Class MultiRangeQuery.RangeTree
- java.lang.Object
-
- org.apache.lucene.sandbox.search.MultiRangeQuery.RangeTree
-
- All Implemented Interfaces:
MultiRangeQuery.Relatable
- Enclosing class:
- MultiRangeQuery
private static class MultiRangeQuery.RangeTree extends java.lang.Object implements MultiRangeQuery.Relatable
An interval tree of Ranges for speeding up computations
-
-
Field Summary
Fields Modifier and Type Field Description private intbytesPerDimprivate ArrayUtil.ByteArrayComparatorcomparatorprivate MultiRangeQuery.RangecomponentRange of this tree nodeprivate MultiRangeQuery.RangeTreeleftLeft child, it can be nullprivate byte[]maxPackedValuemaximum value contained in this range sub-treeprivate intnumIndexDimprivate MultiRangeQuery.RangeTreerightRight child, it can be nullprivate intsplitwhich dimension was this node split on
-
Constructor Summary
Constructors Modifier Constructor Description privateRangeTree(MultiRangeQuery.Range component, int split, ArrayUtil.ByteArrayComparator comparator, int numIndexDim, int bytesPerDim)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(byte[] packedValue)return true if the provided point is inside the rangePointValues.Relationrelate(byte[] minPackedValue, byte[] maxPackedValue)return the relation between this range and the provided range
-
-
-
Field Detail
-
maxPackedValue
private final byte[] maxPackedValue
maximum value contained in this range sub-tree
-
left
private MultiRangeQuery.RangeTree left
Left child, it can be null
-
right
private MultiRangeQuery.RangeTree right
Right child, it can be null
-
split
private final int split
which dimension was this node split on
-
component
private final MultiRangeQuery.Range component
Range of this tree node
-
comparator
private final ArrayUtil.ByteArrayComparator comparator
-
numIndexDim
private final int numIndexDim
-
bytesPerDim
private final int bytesPerDim
-
-
Constructor Detail
-
RangeTree
private RangeTree(MultiRangeQuery.Range component, int split, ArrayUtil.ByteArrayComparator comparator, int numIndexDim, int bytesPerDim)
-
-
Method Detail
-
matches
public boolean matches(byte[] packedValue)
Description copied from interface:MultiRangeQuery.Relatablereturn true if the provided point is inside the range- Specified by:
matchesin interfaceMultiRangeQuery.Relatable
-
relate
public PointValues.Relation relate(byte[] minPackedValue, byte[] maxPackedValue)
Description copied from interface:MultiRangeQuery.Relatablereturn the relation between this range and the provided range- Specified by:
relatein interfaceMultiRangeQuery.Relatable
-
-