use of me.lemire.integercompression.synth.ClusteredDataGenerator in project RoaringBitmap by RoaringBitmap.
the class BenchmarkDataGenerator method generate.
static BenchmarkData generate(int param, int howMany, int smallType, int bigType) {
IntegerDistribution ud = new UniformIntegerDistribution(new Well19937c(param + 17), Short.MIN_VALUE, Short.MAX_VALUE);
ClusteredDataGenerator cd = new ClusteredDataGenerator();
IntegerDistribution p = new UniformIntegerDistribution(new Well19937c(param + 123), SMALLEST_ARRAY, BIGGEST_ARRAY / param);
BenchmarkContainer[] smalls = new BenchmarkContainer[howMany];
BenchmarkContainer[] bigs = new BenchmarkContainer[howMany];
for (int i = 0; i < howMany; i++) {
int smallSize = p.sample();
int bigSize = smallSize * param;
short[] small = smallType == 0 ? generateUniform(ud, smallSize) : generateClustered(cd, smallSize);
short[] big = bigType == 0 ? generateUniform(ud, bigSize) : generateClustered(cd, bigSize);
smalls[i] = new BenchmarkContainer(small);
bigs[i] = new BenchmarkContainer(big);
}
return new BenchmarkData(smalls, bigs);
}
use of me.lemire.integercompression.synth.ClusteredDataGenerator in project RoaringBitmap by RoaringBitmap.
the class BenchmarkDataGenerator method generate.
static BenchmarkData generate(int param, int howMany, int smallType, int bigType) {
IntegerDistribution ud = new UniformIntegerDistribution(new Well19937c(param + 17), Short.MIN_VALUE, Short.MAX_VALUE);
ClusteredDataGenerator cd = new ClusteredDataGenerator();
IntegerDistribution p = new UniformIntegerDistribution(new Well19937c(param + 123), SMALLEST_ARRAY, BIGGEST_ARRAY / param);
BenchmarkContainer[] smalls = new BenchmarkContainer[howMany];
BenchmarkContainer[] bigs = new BenchmarkContainer[howMany];
for (int i = 0; i < howMany; i++) {
int smallSize = p.sample();
int bigSize = smallSize * param;
short[] small = smallType == 0 ? generateUniform(ud, smallSize) : generateClustered(cd, smallSize);
short[] big = bigType == 0 ? generateUniform(ud, bigSize) : generateClustered(cd, bigSize);
smalls[i] = new BenchmarkContainer(small);
bigs[i] = new BenchmarkContainer(big);
}
return new BenchmarkData(smalls, bigs);
}
Aggregations