protected void fillAndSort(final int dim){
  for (int j=0; j < size; j++) {
    E e=get(j);
    minSorting[j].first=e.getMin(dim);
    minSorting[j].second=j;
    maxSorting[j].first=e.getMax(dim);
    maxSorting[j].second=j;
  }
  Arrays.sort(minSorting);
  Arrays.sort(maxSorting);
}

protected void fillAndSort ( final int dim ) { for ( int j = 0 ; j < size ; j ++ ) { E e = get ( j ) ; minSorting [ j ] . first = e . getMin ( dim ) ; minSorting [ j ] . second = j ; maxSorting [ j ] . first = e . getMax ( dim ) ; maxSorting [ j ] . second = j ; } Arrays . sort ( minSorting ) ; Arrays . sort ( maxSorting ) ; }
fill the array with the dimension projection needed for sorting .
