hydroScalingAPI.util.probability
Class GeneralGeometricDistribution

java.lang.Object
  extended by hydroScalingAPI.util.probability.GeneralGeometricDistribution
All Implemented Interfaces:
DiscreteDistribution

public class GeneralGeometricDistribution
extends java.lang.Object
implements DiscreteDistribution

An implementation of DiscreteDistribution using a generalized geometric distribution P(i)=b*c^i, i>1 and P(0)=1-sum(P(i))

Author:
Ricardo Mantilla

Constructor Summary
GeneralGeometricDistribution(double theCoeff, double theBase, int theMinVal)
          Creates a new instance of GeneralGeometricDistribution
 
Method Summary
static void main(java.lang.String[] args)
          Tests for the class
 int sample()
          Returns a random value that follows a generalized geometric distribution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralGeometricDistribution

public GeneralGeometricDistribution(double theCoeff,
                                    double theBase,
                                    int theMinVal)
Creates a new instance of GeneralGeometricDistribution

Parameters:
theCoeff - The probability of success
theBase - The probability of failure
theMinVal - The lower limit of the random variable
Method Detail

sample

public int sample()
Returns a random value that follows a generalized geometric distribution

Specified by:
sample in interface DiscreteDistribution
Returns:
A random value

main

public static void main(java.lang.String[] args)
Tests for the class

Parameters:
args - the command line arguments


CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.