@Test public void testGetProb() { assertEquals(GeometricDistribution.getProb(1, .1), .1, 1E-10); assertEquals(GeometricDistribution.getLog2Prob(1, .1), DoubleMath.log2(.1), 1E-10); assertEquals(GeometricDistribution.getProb(2, .1), .09, 1E-10); assertEquals(GeometricDistribution.getLog2Prob(2, .1), DoubleMath.log2(.09), 1E-10); }
public static double getProb(int x, double p) { return Math.pow(2, getLog2Prob(x, p)); }
GeometricDistribution { public static double getProb(int x, double p) { return Math.pow(2, getLog2Prob(x, p)); } }
GeometricDistribution { public static double getProb(int x, double p) { return Math.pow(2, getLog2Prob(x, p)); } private  GeometricDistribution(); }
GeometricDistribution { public static double getProb(int x, double p) { return Math.pow(2, getLog2Prob(x, p)); } private  GeometricDistribution(); static double getLog2Prob(int x, double p); static double getProb(int x, double p); }
GeometricDistribution { public static double getProb(int x, double p) { return Math.pow(2, getLog2Prob(x, p)); } private  GeometricDistribution(); static double getLog2Prob(int x, double p); static double getProb(int x, double p);  }