org.apache.hadoop.tools.rumen
Class CDFRandomGenerator
java.lang.Object
org.apache.hadoop.tools.rumen.CDFRandomGenerator
- Direct Known Subclasses:
- CDFPiecewiseLinearRandomGenerator
public abstract class CDFRandomGenerator
- extends Object
An instance of this class generates random values that confirm to the
embedded LoggedDiscreteCDF
. The discrete CDF is a pointwise
approximation of the "real" CDF. We therefore have a choice of interpolation
rules.
A concrete subclass of this abstract class will implement valueAt(double)
using a class-dependent interpolation rule.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
initializeTables
protected final void initializeTables(LoggedDiscreteCDF cdf)
floorIndex
protected int floorIndex(double probe)
getRankingAt
protected double getRankingAt(int index)
getDatumAt
protected long getDatumAt(int index)
randomValue
public long randomValue()
valueAt
public abstract long valueAt(double probability)
Copyright © 2009 The Apache Software Foundation