42 RealVector
const & fitness,
43 RealVector
const & weights,
44 RealVector
const & optimalPointFitness
46 auto w = weights[0] == 0 ? 1e-5 : weights[0];
47 double max_fun = w * std::abs(fitness[0] - optimalPointFitness[0]);
48 for(std::size_t i = 1; i < fitness.size(); ++i){
49 w = weights[i] == 0 ? 1e-5: weights[i];
50 max_fun = std::max(max_fun,w * std::abs(fitness[i] - optimalPointFitness[i]));