public static interface SampleIndex.IOffsetSampler
Modifier and Type | Method and Description |
---|---|
long[] |
getOffsets(long seed,
int limit,
long fromIndex,
long toIndex)
Return an array of tuple indices which may be used to sample a key
range of some index.
|
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.
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 bound0IllegalArgumentException
- if limit is non-positive.IllegalArgumentException
- if fromIndex is negative.IllegalArgumentException
- if toIndex is negative.IllegalArgumentException
- unless toIndex is GT fromIndex.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.