io.nosqlbench.virtdata.library.curves4.discrete.common.IntegerDistributionICDSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-cql-shaded Show documentation
Show all versions of driver-cql-shaded Show documentation
A Shaded CQL ActivityType driver for http://nosqlbench.io/
package io.nosqlbench.virtdata.library.curves4.discrete.common;
import org.apache.commons.statistics.distribution.DiscreteDistribution;
import java.util.function.DoubleToIntFunction;
public class IntegerDistributionICDSource implements DoubleToIntFunction {
private DiscreteDistribution integerDistribution;
public IntegerDistributionICDSource(DiscreteDistribution integerDistribution) {
this.integerDistribution = integerDistribution;
}
@Override
public int applyAsInt(double value) {
return integerDistribution.inverseCumulativeProbability(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy