Package com.facebook.LinkBench.distributions

Examples of com.facebook.LinkBench.distributions.UniformDistribution.choose()


    for (long max: maxes) {
      UniformDistribution dist = new UniformDistribution();
      dist.init(0, max, 1);
      for (int trial = 0; trial < trials; trial++) {
        long i = dist.choose(rng);
        assertTrue(i >= 0);
        assertTrue(i < max);
      }
    }
  }
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.