org.ojalgo.random
Class Geometric

java.lang.Object
  extended by java.lang.Number
      extended by org.ojalgo.random.RandomNumber
          extended by org.ojalgo.random.Geometric
All Implemented Interfaces:
Serializable, Function<Double>, NullaryFunction<Double>, DiscreteDistribution, Distribution

public class Geometric
extends RandomNumber

The number of required trials until an event with probability aProbability occurs has a geometric distribution.

Author:
apete
See Also:
Serialized Form

Constructor Summary
Geometric()
           
Geometric(double aProbability)
           
 
Method Summary
 double getExpected()
           
 double getProbability(int aVal)
          Probability density function
 double getVariance()
          Subclasses must override either getStandardDeviation() or getVariance()!
 
Methods inherited from class org.ojalgo.random.RandomNumber
doubleValue, floatValue, getStandardDeviation, intValue, invoke, longValue, toString
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ojalgo.random.Distribution
getStandardDeviation
 

Constructor Detail

Geometric

public Geometric()

Geometric

public Geometric(double aProbability)
Method Detail

getExpected

public double getExpected()

getProbability

public double getProbability(int aVal)
Description copied from interface: DiscreteDistribution
Probability density function


getVariance

public double getVariance()
Description copied from class: RandomNumber
Subclasses must override either getStandardDeviation() or getVariance()!

Specified by:
getVariance in interface Distribution
Overrides:
getVariance in class RandomNumber
See Also:
Distribution.getStandardDeviation(), Distribution.getVariance()