Package com.nr.sort

Examples of com.nr.sort.Indexx.index()


    // Test use of empty constructor and member function index() with pointers
    double a[][]={{3.0,2.0,1.0,5.0,4.0},{3.0,1.0,5.0,2.0,4.0},{5.0,2.0,4.0,1.0,3.0}}; // matrix with unsorted rows
    int b[][]={{2,1,0,4,3},{1,3,0,4,2},{3,1,4,2,0}};    // Hand-generated index array for each row
    Indexx myhack = new Indexx();
    for (i=0;i<3;i++) {
      myhack.index(a[i],5);
      for (j=0;j<5;j++) localflag = localflag || (myhack.indx[j] != b[i][j]);
    }
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** Indexx: Member function index() did not work on array passed by pointer");
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.