org.cfpm.caves.za
Class SouthAfricaModel.EmpiricalDiscreteDist
java.lang.Object
org.cfpm.caves.za.SouthAfricaModel.EmpiricalDiscreteDist
- Enclosing class:
- SouthAfricaModel
class SouthAfricaModel.EmpiricalDiscreteDist
- extends java.lang.Object
This inner class defines a discrete distribution of empirical values, e.g. the marital status of females.
The distribution does not store the actual values (e.g. single, married, divorced, widowed) but replaces them
with integer numbers from 0 to n-1, to be used as indices into the array of values. The user has to
specify the probabilities for the values and a random number generator.
- Author:
- Ruth
Method Summary |
int |
nextInt()
returns a new sample, i.e. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
randomGenerator
cern.jet.random.engine.RandomEngine randomGenerator
probabilities
double[] probabilities
SouthAfricaModel.EmpiricalDiscreteDist
public SouthAfricaModel.EmpiricalDiscreteDist(double[] probabilities,
cern.jet.random.engine.RandomEngine randomGenerator)
nextInt
public int nextInt()
- returns a new sample, i.e. index value between 0 and n-1