public static class SampleIndex.AcceptanceSetOffsetSampler extends Object implements SampleIndex.IOffsetSampler
|Constructor and Description|
|Modifier and Type||Method and Description|
Return an array of tuple indices which may be used to sample a key range of some index.
public long getOffsets(long seed, int limit, long fromIndex, long toIndex)
Note: The caller must stop when it runs out of offsets, not when the limit is satisfied, as there will be fewer offsets returned when the half open range is smaller than the limit.
Note: The utility of this class is limited to moderate range counts (~100k) so it will reject anything with a very large range count.
seed- The seed for the random number generator -or- ZERO (0L) for a random seed. A non-zero value may be used to create a repeatable sample.
limit- The maximum #of tuples to sample.
fromIndex- The inclusive lower bound.
toIndex- The exclusive upper bound0
UnsupportedOperationException- if the rangeCount is GT
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.