93 std::size_t counter1 = 0, counter2 = 0;
94 for( std::size_t i = 1; i < x.size(); i++ ) {
97 value[1] +=
sqr( x(i) - 0.8*x( 0 )*::cos( 6 * M_PI * x( 0 ) + (i-1)*M_PI/(x.size()-1) ) );
100 value[0] +=
sqr( x(i) - 0.8*x( 0 )*::sin( 6 * M_PI * x( 0 ) + (i-1)*M_PI/(x.size()-1) ) );
104 value[0] *= 2./counter1;
107 value[1] *= 2./counter2;
108 value[1] += 1 - ::sqrt( x( 0 ) );