28 #ifndef SHARK_OBJECTIVEFUNCTIONS_BENCHMARK_GSP_H 29 #define SHARK_OBJECTIVEFUNCTIONS_BENCHMARK_GSP_H 70 double alpha = 1. / ( 2. * m_gamma );
72 double sum1 = 0., sum2 = 0.;
74 for( std::size_t i = 0; i < x.size(); i++ ) {
75 sum1 +=
sqr( x( i ) );
76 sum2 +=
sqr( 1 - x( i ) );
79 double alphaN = 1. / ( std::pow( x.size(), alpha ) );
81 value[0] = alphaN * std::pow( sum1, alpha );
82 value[1] = alphaN * std::pow( sum2, alpha );