- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.facebook.LinkBench.distributions.ZipfDistribution
类的一些代码示例,展示了ZipfDistribution
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipfDistribution
类的具体详情如下:
包路径:com.facebook.LinkBench.distributions.ZipfDistribution
类名称:ZipfDistribution
暂无
代码示例来源:origin: facebookarchive/linkbench
/**
* Algorithm from "Quickly Generating Billion-Record Synthetic Databases",
* Gray et. al., 1994
*
* Pick a value in range [min, max) according to zipf distribution,
* with min being the most likely to be chosen
*/
@Override
public long choose(Random rng) {
return quantile(rng.nextDouble());
}
代码示例来源:origin: facebookarchive/linkbench
@Override
public double pdf(long id) {
return scaledPDF(id, 1.0);
}
代码示例来源:origin: facebookarchive/linkbench
@Test
public void testZipf() {
ZipfDistribution z = new ZipfDistribution();
Properties props = new Properties();
props.setProperty("shape", "0.5");
int min = 100, max = 200;
z.init(min, max, props, "");
ProbAccessDistribution unshuffled = new ProbAccessDistribution(z, null);
testSanityAccessDist(unshuffled, min, max);
ProbAccessDistribution shuffled = new ProbAccessDistribution(z,
new InvertibleShuffler(13, 25, max - min));
testSanityAccessDist(shuffled, min, max);
}
代码示例来源:origin: facebookarchive/linkbench
@Override
public ProbabilityDistribution getDist() {
return new ZipfDistribution();
}
代码示例来源:origin: facebookarchive/linkbench
private double calcZetan(long n) {
if (n < MIN_CACHE_VALUE) {
return uncachedCalcZetan(n);
}
synchronized(ZipfDistribution.class) {
for (int i = 0; i < zetanCache.size(); i++) {
CacheEntry ce = zetanCache.get(i);
if (ce.n == n && ce.shape == shape) {
return ce.zetan;
}
}
}
double calcZetan = uncachedCalcZetan(n);
synchronized (ZipfDistribution.class) {
CacheEntry ce = new CacheEntry();
ce.zetan = calcZetan;
ce.n = n;
ce.shape = shape;
if (zetanCache.size() >= MAX_CACHE_ENTRIES) {
zetanCache.remove(0);
}
zetanCache.add(ce);
}
return calcZetan;
}
代码示例来源:origin: facebookarchive/linkbench
zetan = calcZetan(n);
eta = (1 - FastMath.pow(2.0 / n, 1 - shape)) /
(1 - Harmonic.generalizedHarmonic(2, shape) / zetan);
代码示例来源:origin: facebookarchive/linkbench
@Override
public double expectedCount(long id) {
return scaledPDF(id, scale);
}
本文整理了Java中org.apache.commons.math3.distribution.ZipfDistribution.inverseCumulativeProbability()方法的一些
本文整理了Java中org.apache.commons.math3.distribution.ZipfDistribution.generalizedHarmonic()方法的一些代码示例,展示了Z
本文整理了Java中org.apache.commons.math3.distribution.ZipfDistribution.probability()方法的一些代码示例,展示了ZipfDistr
本文整理了Java中org.apache.commons.math3.distribution.ZipfDistribution.()方法的一些代码示例,展示了ZipfDistribution.()的
本文整理了Java中org.apache.commons.math3.distribution.ZipfDistribution.calculateNumericalVariance()方法的一些代码
本文整理了Java中org.apache.commons.math3.distribution.ZipfDistribution.getNumberOfElements()方法的一些代码示例,展示了Z
本文整理了Java中org.apache.commons.math3.distribution.ZipfDistribution.calculateNumericalMean()方法的一些代码示例,展
本文整理了Java中org.apache.commons.math3.distribution.ZipfDistribution.sample()方法的一些代码示例,展示了ZipfDistributi
我想基于遵循 Zipf 分布的单词(来自字典)创建一个数据源(在 Java 中)。所以我来ZipfDistribution和 NormalDistribution Apache 公共(public)库
我是一名优秀的程序员,十分优秀!