Examples of Ran


Examples of com.nr.ran.Ran

   

    // Test sort2
    System.out.println("Testing sort2");
    Ran myran = new Ran(17);
    for (i=0;i<N;i++) {
      x[i]=myran.doub();
      y[i]=1.0-x[i];    // y is in opposite order of x
    }
    Sorter.sort2(x,y);
    for (i=0;i<N-1;i++) localflag = localflag || (x[i] > x[i+1]);
    globalflag = globalflag || localflag;
View Full Code Here

Examples of com.nr.ran.Ran

   

    // Test Indexx
    System.out.println("Testing Indexx");
    Ran myran = new Ran(17);
    for (i=0;i<N;i++) x[i]=myran.doub()
    Indexx idx =new Indexx(x);      // Create the index
    double[] xx=buildVector(x);     // Copy of x
    idx.sort(xx);     // Test sort on x itself
    for (i=0;i<N-1;i++) localflag = localflag || (xx[i] > xx[i+1]);
    globalflag = globalflag || localflag;
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.