protected void adaptGrid(){
  Arrays.fill(minimum,Double.POSITIVE_INFINITY);
  Arrays.fill(maximum,Double.NEGATIVE_INFINITY);
  Arrays.fill(density,0);
  for (  Solution solution : this) {
    for (int i=0; i < problem.getNumberOfObjectives(); i++) {
      minimum[i]=Math.min(minimum[i],solution.getObjective(i));
      maximum[i]=Math.max(maximum[i],solution.getObjective(i));
    }
  }
  for (  Solution solution : this) {
    density[findIndex(solution)]++;
  }
}

protected void adaptGrid ( ) { Arrays . fill ( minimum , Double . POSITIVE_INFINITY ) ; Arrays . fill ( maximum , Double . NEGATIVE_INFINITY ) ; Arrays . fill ( density , 0 ) ; for ( Solution solution : this ) { for ( int i = 0 ; i < problem . getNumberOfObjectives ( ) ; i ++ ) { minimum [ i ] = Math . min ( minimum [ i ] , solution . getObjective ( i ) ) ; maximum [ i ] = Math . max ( maximum [ i ] , solution . getObjective ( i ) ) ; } } for ( Solution solution : this ) { density [ findIndex ( solution ) ] ++ ; } }
computes new lower and upper bounds and recalculates the densities of each grid cell .
