Package cern.jet.random.engine

Examples of cern.jet.random.engine.MersenneTwister64.nextDouble()


    };

    final RandomEngine ran = new MersenneTwister64(MersenneTwister.DEFAULT_SEED);
    final double[] temp = new double[nWeights];
    for (int i = 0; i < nWeights; i++) {
      temp[i] = ran.nextDouble();
    }
    final DoubleMatrix1D start = new DoubleMatrix1D(temp);

    final LeastSquareResults lsRes = NLLSWP.solve(new DoubleMatrix1D(obs), new DoubleMatrix1D(n, 0.01), func, jac, start, penalty);
    if(print) {
View Full Code Here


  @Test
  //TODO if this interpolator cannot get the answer right then an exception should be thrown
  public void testFlat() {
    final RandomEngine random = new MersenneTwister64(MersenneTwister.DEFAULT_SEED);
    final double x1 = 10 * random.nextDouble();
    final double x2 = 10 * random.nextDouble();
    final double x3 = 10 * random.nextDouble();
    // Fails utterly for flat surface since the variogram function will be zero for all r
    final InterpolatorND interpolator = new KrigingInterpolatorND(1.99);
    final InterpolatorNDDataBundle dataBundle = interpolator.getDataBundle(FLAT_DATA);
View Full Code Here

  @Test
  //TODO if this interpolator cannot get the answer right then an exception should be thrown
  public void testFlat() {
    final RandomEngine random = new MersenneTwister64(MersenneTwister.DEFAULT_SEED);
    final double x1 = 10 * random.nextDouble();
    final double x2 = 10 * random.nextDouble();
    final double x3 = 10 * random.nextDouble();
    // Fails utterly for flat surface since the variogram function will be zero for all r
    final InterpolatorND interpolator = new KrigingInterpolatorND(1.99);
    final InterpolatorNDDataBundle dataBundle = interpolator.getDataBundle(FLAT_DATA);
    assertEquals(INTERPOLATOR.interpolate(dataBundle, new double[] {x1, x2, x3}), 0, 0);
View Full Code Here

  //TODO if this interpolator cannot get the answer right then an exception should be thrown
  public void testFlat() {
    final RandomEngine random = new MersenneTwister64(MersenneTwister.DEFAULT_SEED);
    final double x1 = 10 * random.nextDouble();
    final double x2 = 10 * random.nextDouble();
    final double x3 = 10 * random.nextDouble();
    // Fails utterly for flat surface since the variogram function will be zero for all r
    final InterpolatorND interpolator = new KrigingInterpolatorND(1.99);
    final InterpolatorNDDataBundle dataBundle = interpolator.getDataBundle(FLAT_DATA);
    assertEquals(INTERPOLATOR.interpolate(dataBundle, new double[] {x1, x2, x3}), 0, 0);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.