Examples of nextIntFromTo()


Examples of org.apache.mahout.math.jet.random.Uniform.nextIntFromTo()

      for (int i = N; --i >= 0;) {
        permutation[i] = i;
      }
      Uniform gen = new Uniform(new MersenneTwister((int) p));
      for (int i = 0; i < N - 1; i++) {
        int random = gen.nextIntFromTo(i, N - 1);

        //swap(i, random)
        int tmp = permutation[random];
        permutation[random] = permutation[i];
        permutation[i] = tmp;
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.