

/**
 *
 * RVRandomUniformDoubleProcess
 *
 * creates a uniform random-process which returns double-values  
 *
 */

package resample;

public class RVRandomUniformDoubleProcess extends RVRandomProcess {
  
 /**
  * constructor (): 
  *
  * creates a Random-object without interval for the random-methods to match.
  * Method nextNumber returns in this case a random double value between 0.0 and 1.0
  *
  */
  
  public RVRandomUniformDoubleProcess() {   
    super ();
  }

 /**
  * constructor (int min, int max): 
  *
  * creates a Random-object with interval [min,max] for the random-methods to match
  *
  */

  public RVRandomUniformDoubleProcess (int min, int max) {
    super (min,max); 
  }
  
  public double nextNumber () {

    if (isIntervalProcess) 
       return min + (randomSeries.nextDouble() * intervalLength);
    else  
      return randomSeries.nextDouble();   // value between 0.0 and 1.0
  }

}     // end class


