org.apache.hadoop.tools.rumen
Class CDFPiecewiseLinearRandomGenerator

java.lang.Object
  extended by org.apache.hadoop.tools.rumen.CDFRandomGenerator
      extended by org.apache.hadoop.tools.rumen.CDFPiecewiseLinearRandomGenerator

public class CDFPiecewiseLinearRandomGenerator
extends CDFRandomGenerator


Constructor Summary
CDFPiecewiseLinearRandomGenerator(LoggedDiscreteCDF cdf)
           
CDFPiecewiseLinearRandomGenerator(LoggedDiscreteCDF cdf, long seed)
           
 
Method Summary
 long valueAt(double probability)
          TODO This code assumes that the empirical minimum resp.
 
Methods inherited from class org.apache.hadoop.tools.rumen.CDFRandomGenerator
floorIndex, getDatumAt, getRankingAt, initializeTables, randomValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDFPiecewiseLinearRandomGenerator

public CDFPiecewiseLinearRandomGenerator(LoggedDiscreteCDF cdf)
Parameters:
cdf - builds a CDFRandomValue engine around this LoggedDiscreteCDF, with a defaultly seeded RNG

CDFPiecewiseLinearRandomGenerator

public CDFPiecewiseLinearRandomGenerator(LoggedDiscreteCDF cdf,
                                         long seed)
Parameters:
cdf - builds a CDFRandomValue engine around this LoggedDiscreteCDF, with an explicitly seeded RNG
seed - the random number generator seed
Method Detail

valueAt

public long valueAt(double probability)
TODO This code assumes that the empirical minimum resp. maximum is the epistomological minimum resp. maximum. This is probably okay for the minimum, because that likely represents a task where everything went well, but for the maximum we may want to develop a way of extrapolating past the maximum.

Specified by:
valueAt in class CDFRandomGenerator


Copyright © 2009 The Apache Software Foundation