Examples of ProbLinkDistribution


Examples of com.facebook.LinkBench.distributions.LinkDistributions.ProbLinkDistribution

  private static double testGetNlinks(Properties props,
                                    int startid1, int maxid1)
  throws Exception {
    RealDistribution rDist = new RealDistribution();
    rDist.init(props, startid1, maxid1, DistributionType.LINKS);
    ProbLinkDistribution dist = new ProbLinkDistribution(rDist);
    int[] nlinks = new int[maxid1];
    for (int i = startid1; i < maxid1; ++i) {
      long x = dist.getNlinks(i);
      if (x < 0) {
        fail("x is negative: " + x + " for i=" + i);
      }
      nlinks[i] = (int)x;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.