public void evaluate(final MultivariateFunction evaluationFunction,final Comparator<PointValuePair> comparator){
  for (int i=0; i < simplex.length; i++) {
    final PointValuePair vertex=simplex[i];
    final double[] point=vertex.getPointRef();
    if (Double.isNaN(vertex.getValue())) {
      simplex[i]=new PointValuePair(point,evaluationFunction.value(point),false);
    }
  }
  Arrays.sort(simplex,comparator);
}

public void evaluate ( final MultivariateFunction evaluationFunction , final Comparator < PointValuePair > comparator ) { for ( int i = 0 ; i < simplex . length ; i ++ ) { final PointValuePair vertex = simplex [ i ] ; final double [ ] point = vertex . getPointRef ( ) ; if ( Double . isNaN ( vertex . getValue ( ) ) ) { simplex [ i ] = new PointValuePair ( point , evaluationFunction . value ( point ) , false ) ; } } Arrays . sort ( simplex , comparator ) ; }
evaluate all the non - evaluated points of the simplex .
