docs: private static void checkSort(Instances insts, int[] indices, int attidx, 
                                 int start, int end) throws Exception {
      for(int i=start+1; i<=end; i++) {
        if( insts.instance(indices[i-1]).value(attidx) > 
            insts.instance(indices[i]).value(attidx) ) {
          System.out.println("value[i-1]: "+insts.instance(indices[i-1]).value(attidx));
          System.out.println("value[i]: "+insts.instance(indices[i]).value(attidx));
          System.out.println("indices[i-1]: "+indices[i-1]);
          System.out.println("indices[i]: "+indices[i]);
          System.out.println("i: "+i);
          if(insts.instance(indices[i-1]).value(attidx) > insts.instance(indices[i]).value(attidx))
            System.out.println("value[i-1] > value[i]");
          
          throw new Exception("Indices not sorted correctly.");
        }//end if
      }
    }