code: public static boolean checkIndicesSorted( DMatrixSparseCSC A ) {
          for (int j = 0; j < A.numCols; j++) {
              int idx0 = A.col_idx[j];
              int idx1 = A.col_idx[j+1];
  
              if( idx0 != idx1 && A.nz_rows[idx0] >= A.numRows )
                  return false;
  
              for (int i = idx0+1; i < idx1; i++) {
                  int row = A.nz_rows[i];
                  if( A.nz_rows[i-1] >= row)
                      return false;
                  if( row >= A.numRows )
                      return false;
              }
          }
          return true;
      }
docs: Checks to see if row indicies are sorted into ascending order.  O(N)
  @return true if sorted and false if not