Package cern.jet.random

Examples of cern.jet.random.Uniform


* @param weight the weight.
* @param randomGenerator a random number generator. Set this parameter to <tt>null</tt> to use the default random number generator.
*/
public WeightedRandomSampler(int weight, RandomEngine randomGenerator) {
  if (randomGenerator==null) randomGenerator = cern.jet.random.AbstractDistribution.makeDefaultGenerator();
  this.generator = new Uniform(randomGenerator);
  setWeight(weight);
}
View Full Code Here


 
  /*
   * Use a new random number generator to generate numExamples
   * random gaussians, and add them to the QuantileBin1D
   */
  Uniform dataRand = new Uniform(new DRand(7757));
  for (int i = 1; i <= numExamples; i++) {
    double gauss = dataRand.nextDouble();
      qAccum.add(gauss);
      dbin.add(gauss);
  }
 
  /*
 
View Full Code Here

* @param weight the weight.
* @param randomGenerator a random number generator. Set this parameter to <tt>null</tt> to use the default random number generator.
*/
public WeightedRandomSampler(int weight, RandomEngine randomGenerator) {
  if (randomGenerator==null) randomGenerator = cern.jet.random.AbstractDistribution.makeDefaultGenerator();
  this.generator = new Uniform(randomGenerator);
  setWeight(weight);
}
View Full Code Here

 
  /*
   * Use a new random number generator to generate numExamples
   * random gaussians, and add them to the QuantileBin1D
   */
  Uniform dataRand = new Uniform(new DRand(7757));
  for (int i = 1; i <= numExamples; i++) {
    double gauss = dataRand.nextDouble();
      qAccum.add(gauss);
      dbin.add(gauss);
  }
 
  /*
 
View Full Code Here

    distributions = new HashMap<String, AbstractDistribution>();

    if (logger.isDebugEnabled()) {
      distributions.put(UNIFORM_DEFAULT, new UUniformDistributionController(generators.get(null)));
    } else {
      distributions.put(UNIFORM_DEFAULT, new Uniform(generators.get(null)));
    }
  }
View Full Code Here

  /**
   * @see de.cesr.uranus.core.UranusRandomService#getUniform(double, double,
   *      cern.jet.random.engine.RandomEngine)
   */
  public Uniform getUniform(double from, double to, RandomEngine engine) {
    Uniform dist;
    if (isDebugEnabled()) {
      dist = new UUniformDistributionController(from, to, engine);
    } else {
      dist =  new Uniform(from, to, engine);
    }

    // <- LOGGING
    if (logger.isDebugEnabled()) {
      logger.debug("Create uniform distribution from " + from + " to " + to
View Full Code Here

      logger.debug("Request new uniform distribution with generator "
          + engine);
    }
    // LOGGING ->

    Uniform uniform = null;
    if (logger.isDebugEnabled()) {
      uniform =  new UUniformDistributionController(engine);
    } else {
      uniform =  new Uniform(engine);
    }
    return uniform;
  }
View Full Code Here

    invalidateDistributions();
    generators.put(null, new MersenneTwister(seed));
    if (logger.isDebugEnabled()) {
      distributions.put(UNIFORM_DEFAULT, new UUniformDistributionController(generators.get(null)));
    } else {
      distributions.put(UNIFORM_DEFAULT, new Uniform(generators.get(null)));
    }

  }
View Full Code Here

    distributions = new HashMap<String, AbstractDistribution>();

    if (logger.isDebugEnabled()) {
      distributions.put(UNIFORM_DEFAULT, new UUniformDistributionController(generators.get(null)));
    } else {
      distributions.put(UNIFORM_DEFAULT, new Uniform(generators.get(null)));
    }
  }
View Full Code Here

  /**
   * @see de.cesr.uranus.core.UranusRandomService#getUniform(double, double,
   *      cern.jet.random.engine.RandomEngine)
   */
  public Uniform getUniform(double from, double to, RandomEngine engine) {
    Uniform dist;
    if (isDebugEnabled()) {
      dist = new UUniformDistributionController(from, to, engine);
    } else {
      dist =  new Uniform(from, to, engine);
    }

    // <- LOGGING
    if (logger.isDebugEnabled()) {
      logger.debug("Create uniform distribution from " + from + " to " + to
View Full Code Here

TOP

Related Classes of cern.jet.random.Uniform

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.