in src/main/java/org/apache/datasketches/characterization/kll/KllSketchAccuracyProfile.java [100:121]
public void prepareTrialSet(final int streamLength) {
this.streamLength = streamLength;
if (useDouble) {
inputDoubleValues = new double[streamLength];
doubleQueryValues = new double[streamLength];
final int[] sortedArr = uniformRandom
? fillUniformRandomDoubles(inputDoubleValues)
: fillContiguousDoubles(inputDoubleValues);
trueRanks = getTrueRanksDoubles(sortedArr, doubleQueryValues);
if (uniformRandom) { compressDoubleQueryValues(); }
}
else { //useFloats
inputFloatValues = new float[streamLength];
floatQueryValues = new float[streamLength];
final int[] sortedArr = uniformRandom
? fillUniformRandomFloats(inputFloatValues)
: fillContiguousFloats(inputFloatValues);
trueRanks = getTrueRanksFloats(sortedArr, floatQueryValues);
if (uniformRandom) { compressFloatQueryValuesAndTrueRanks(); }
}
}