Package mikera.util

Examples of mikera.util.Random


    // Sum up and scale the result to cover the range [-1,1]
    return 27.0 * (n0 + n1 + n2 + n3 + n4);
  }
       
  public static final void seed(long seed) {
    Random r = new Random(seed);
    // Copy original p values into a list to shuffle
    List<Short> sp = new ArrayList<Short>(pInitial.length);
    for (int i = 0; i < pInitial.length; i++) {
      sp.add(pInitial[i]);
    }
View Full Code Here


      permMod12[i] = (short) (perm[i] % 12);
    }
  }

  public static final void seed() {
    seed((new Random()).nextLong());
  }
View Full Code Here

        + snoise(x, y_h, z_d, t_p) * (w_xXy) * (zXt) + snoise(x_w, y,
        z_d, t_p) * (xXh_y) * (zXt)) / (w * h * d * t));
  }
       
  public static final void seed(long seed) {
    Random r = new Random(seed);
    // Copy original p values into a list to shuffle
    List<Integer> sp = new ArrayList<Integer>(pInitial.length);
    for (int i = 0; i < pInitial.length; i++) {
      sp.add(pInitial[i]);
    }
View Full Code Here

      p[i] = sp.get(i);
    }
  }

  public static final void seed() {
    seed((new Random()).nextLong());
  }
View Full Code Here

// Can't believe I'm writing a test case to test the test cases. Just in case...

public class TestTesting {
  @Test public void testTestVectors() {
    for (int i=1; i<30; i++) {
      Random r=new Random();
      r.setSeed(i);
      AVector v=Testing.createTestVector(i, r);
      assertEquals(i,v.length());
      new TestVectors().doGenericTests(v);
    }
  }
View Full Code Here

import mikera.vectorz.impl.Vector0;

public class Testing {

  public static AVector createTestVector(int length) {
    return createTestVector(length,new Random());
  }
View Full Code Here

TOP

Related Classes of mikera.util.Random

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.