org.cfpm.caves.za
Class SouthAfricaModel.EmpiricalDiscreteDistArray

java.lang.Object
  extended by org.cfpm.caves.za.SouthAfricaModel.EmpiricalDiscreteDistArray
Enclosing class:
SouthAfricaModel

 class SouthAfricaModel.EmpiricalDiscreteDistArray
extends java.lang.Object

An array of discrete distributions of empirical values. Each distribution is associated with a particular interval. This class is used in the model for the distribution of education levels according to age groups. The user has to specify a set of intervals (age groups), the probabilities for each distribution and a random number generator.

Author:
Ruth

Field Summary
(package private)  SouthAfricaModel.EmpiricalDiscreteDist[] distArray
           
(package private)  double[] intervals
           
 
Constructor Summary
SouthAfricaModel.EmpiricalDiscreteDistArray(double[] intervals, double[][] probabilities, cern.jet.random.engine.RandomEngine randomGenerator)
           
 
Method Summary
 int nextInt(double x)
          returns a new sample from the distribution associated with the interval containing x
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

distArray

SouthAfricaModel.EmpiricalDiscreteDist[] distArray

intervals

double[] intervals
Constructor Detail

SouthAfricaModel.EmpiricalDiscreteDistArray

public SouthAfricaModel.EmpiricalDiscreteDistArray(double[] intervals,
                                                   double[][] probabilities,
                                                   cern.jet.random.engine.RandomEngine randomGenerator)
Method Detail

nextInt

public int nextInt(double x)
returns a new sample from the distribution associated with the interval containing x