T - filter typepublic class BacktrackingQueryBuilder<F,T,V extends Content<V>,R extends Range<T,V>> extends Object implements QueryBuilder<F,R>
| Constructor and Description |
|---|
BacktrackingQueryBuilder(RegionInspector<F,V> regionInspector,
FilterCombiner<F,V,R> intervalCombiner,
int maxFilteredIndexRanges,
boolean alwaysRemoveVacuum,
RangeHome<T,V,R> rangeHome,
V zero) |
| Modifier and Type | Method and Description |
|---|---|
static <F,T,V extends Content<V>,R extends Range<T,V>> |
create(RegionInspector<F,V> regionInspector,
FilterCombiner<F,V,R> intervalCombiner,
int maxFilteredIndexRanges,
boolean removeVacuum,
RangeHome<T,V,R> rangeHome,
V zero) |
Query<F,R> |
get()
Returns the query constructed so far as a random access list.
|
boolean |
visit(Pow2LengthBitSetRange indexRange,
List<Pow2LengthBitSetRange> orthotope)
Checks the relationship of the input orthotope against the query region and
if it is:
SpatialRelation.DISJOINT: Augments the current gap with the
othotope's estimated number of points.
SpatialRelation.OVERLAPS: Asks to see the children.
SpatialRelation.COVERED:
If the current gap is zero and alwaysRemoveVacuum is
true, then it joins the new index range to the previous one.
Otherwise it adds the current range to the internal min-heap of ranges,
with the current gap as the key. |
public boolean visit(Pow2LengthBitSetRange indexRange, List<Pow2LengthBitSetRange> orthotope)
SpatialRelation.DISJOINT: Augments the current gap with the
othotope's estimated number of points.SpatialRelation.OVERLAPS: Asks to see the children.SpatialRelation.COVERED:
alwaysRemoveVacuum is
true, then it joins the new index range to the previous one.maxFilteredIndexRanges, does it then combine together
the two ranges with the minimum gap between them. If multiple such
consecutive ranges exists, one of them will be picked.PriorityQueue.remove(java.lang.Object) does not specify if the
removal of the least value is deterministic or not. Instead it only says
that ties are broken arbitrarily. If PriorityQueue is deterministic
on a specific platform, then this class is also deterministic on that
particular platform.visit in interface SpaceVisitorindexRange - When its length is 1, the return value will be
ignored since there are no more children to visit anyway on the current
path. Its value is guaranteed to be greater than its value in all previous
calls that either returned false, or they had an index range
length of 1.public static <F,T,V extends Content<V>,R extends Range<T,V>> BacktrackingQueryBuilder<F,T,V,R> create(RegionInspector<F,V> regionInspector, FilterCombiner<F,V,R> intervalCombiner, int maxFilteredIndexRanges, boolean removeVacuum, RangeHome<T,V,R> rangeHome, V zero)
Copyright © 2014. All Rights Reserved.