35 #ifndef SHARK_ALGORITHMS_DIRECT_SEARCH_OPERATORS_SCALARIZERS_TCHEBYCHEFF 36 #define SHARK_ALGORITHMS_DIRECT_SEARCH_OPERATORS_SCALARIZERS_TCHEBYCHEFF 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]));
58 #endif // SHARK_ALGORITHMS_DIRECT_SEARCH_OPERATORS_SCALARIZERS_TCHEBYCHEFF