31 #ifndef SHARK_OBJECTIVEFUNCTIONS_BENCHMARKS_DISCUS_H 32 #define SHARK_OBJECTIVEFUNCTIONS_BENCHMARKS_DISCUS_H 54 return m_numberOfVariables;
70 for (std::size_t i = 0; i < x.size(); i++) {
78 double sum =
sqr(p(0));
79 for (std::size_t i = 1; i < p.size(); i++)
80 sum += m_alpha *
sqr(p(i));
85 derivative.resize(p.size());
86 noalias(derivative) = (2 * m_alpha) * p;
87 derivative(0) = 2 * p(0);
101 std::size_t m_numberOfVariables;