Package com.facebook.LinkBench.distributions

Examples of com.facebook.LinkBench.distributions.GeometricDistribution.cdf()


   */
  @Test
  public void testGeom() {
    GeometricDistribution d = new GeometricDistribution();
    d.init(1, Long.MAX_VALUE, 0.3, 1.0);
    assertEquals(0.3, d.cdf(1), 0.001);
    assertEquals(0.51, d.cdf(2), 0.001);
    assertEquals(0.657, d.cdf(3), 0.001);
    assertEquals(0.917646, d.cdf(7), 0.001);
    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);
View Full Code Here


  @Test
  public void testGeom() {
    GeometricDistribution d = new GeometricDistribution();
    d.init(1, Long.MAX_VALUE, 0.3, 1.0);
    assertEquals(0.3, d.cdf(1), 0.001);
    assertEquals(0.51, d.cdf(2), 0.001);
    assertEquals(0.657, d.cdf(3), 0.001);
    assertEquals(0.917646, d.cdf(7), 0.001);
    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);
View Full Code Here

  public void testGeom() {
    GeometricDistribution d = new GeometricDistribution();
    d.init(1, Long.MAX_VALUE, 0.3, 1.0);
    assertEquals(0.3, d.cdf(1), 0.001);
    assertEquals(0.51, d.cdf(2), 0.001);
    assertEquals(0.657, d.cdf(3), 0.001);
    assertEquals(0.917646, d.cdf(7), 0.001);
    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);

    assertEquals(0.3, d.pdf(1), 0.001);
View Full Code Here

    GeometricDistribution d = new GeometricDistribution();
    d.init(1, Long.MAX_VALUE, 0.3, 1.0);
    assertEquals(0.3, d.cdf(1), 0.001);
    assertEquals(0.51, d.cdf(2), 0.001);
    assertEquals(0.657, d.cdf(3), 0.001);
    assertEquals(0.917646, d.cdf(7), 0.001);
    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
View Full Code Here

    d.init(1, Long.MAX_VALUE, 0.3, 1.0);
    assertEquals(0.3, d.cdf(1), 0.001);
    assertEquals(0.51, d.cdf(2), 0.001);
    assertEquals(0.657, d.cdf(3), 0.001);
    assertEquals(0.917646, d.cdf(7), 0.001);
    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
    assertEquals(0.147, d.pdf(3), 0.001);
View Full Code Here

    assertEquals(0.3, d.cdf(1), 0.001);
    assertEquals(0.51, d.cdf(2), 0.001);
    assertEquals(0.657, d.cdf(3), 0.001);
    assertEquals(0.917646, d.cdf(7), 0.001);
    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
    assertEquals(0.147, d.pdf(3), 0.001);
    assertEquals(0.035, d.pdf(7), 0.001);
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.