net.sourceforge.cilib.math.random
Class DiscreteRandomNumber

java.lang.Object
  extended by net.sourceforge.cilib.math.random.DiscreteRandomNumber

public final class DiscreteRandomNumber
extends Object

Author:
Gary Pampara

Method Summary
static double getBinomial(double x, double p, double n)
          Get the value of the Binomial distribution at point x, given the values for p and n.
static double getPoisson(double x, double lambda)
          Get the value of the Poisson distribution given a specific point and specific lambda value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPoisson

public static double getPoisson(double x,
                                double lambda)
Get the value of the Poisson distribution given a specific point and specific lambda value.

Parameters:
x - The point to calculate the distribution value from.
lambda - The value of lambda.
Returns:
The value at point x.

getBinomial

public static double getBinomial(double x,
                                 double p,
                                 double n)
Get the value of the Binomial distribution at point x, given the values for p and n.

Parameters:
x - The point to calculate the distribution value from.
p - The value of p.
n - The value of n.
Returns:
The value of the binomial distribution.


Copyright © 2009 CIRG. All Rights Reserved.