Module org.apache.lucene.sandbox
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
An interval tree of Ranges for speeding up computations
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final ArrayUtil.ByteArrayComparatorprivate final MultiRangeQuery.RangeRange of this tree nodeprivate MultiRangeQuery.RangeTreeLeft child, it can be nullprivate final byte[]maximum value contained in this range sub-treeprivate final intprivate MultiRangeQuery.RangeTreeRight child, it can be nullprivate final intwhich dimension was this node split on -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRangeTree(MultiRangeQuery.Range component, int split, ArrayUtil.ByteArrayComparator comparator, int numIndexDim, int bytesPerDim) -
Method Summary
-
Field Details
-
maxPackedValue
private final byte[] maxPackedValuemaximum value contained in this range sub-tree -
left
Left child, it can be null -
right
Right child, it can be null -
split
private final int splitwhich dimension was this node split on -
component
Range of this tree node -
comparator
-
numIndexDim
private final int numIndexDim -
bytesPerDim
private final int bytesPerDim
-
-
Constructor Details
-
RangeTree
private RangeTree(MultiRangeQuery.Range component, int split, ArrayUtil.ByteArrayComparator comparator, int numIndexDim, int bytesPerDim)
-
-
Method Details
-
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
Description copied from interface:MultiRangeQuery.Relatablereturn the relation between this range and the provided range- Specified by:
relatein interfaceMultiRangeQuery.Relatable
-