40 #ifndef SHARK_OBJECTIVEFUNCTIONS_BENCHMARK_LZ1_H 41 #define SHARK_OBJECTIVEFUNCTIONS_BENCHMARK_LZ1_H 91 std::size_t counter1 = 0, counter2 = 0;
92 for( std::size_t i = 1; i < x.size(); i++ ) {
95 value[1] +=
sqr( x(i) - ::pow( x(0), 0.5*(1.0+3*(i-1)/(x.size()-1) ) ) );
98 value[0] +=
sqr( x(i) - ::pow( x(0), 0.5*(1.0+3*(i-1)/(x.size()-1) ) ) );
102 value[0] *= 2./counter1;
105 value[1] *= 2./counter2;
106 value[1] += 1 - ::sqrt( x( 0 ) );