98 std::size_t size=p.size();
99 double sizeMinusOne=p.size() - 1.;
100 derivative.gradient.resize(size);
101 derivative.hessian.resize(size,size);
102 derivative.hessian.clear();
103 for (std::size_t i = 0; i < size; i++) {
104 derivative.gradient(i) = 2 * std::pow(m_alpha, i / sizeMinusOne ) * p(i);
105 derivative.hessian(i,i) = 2 * std::pow(m_alpha, i /sizeMinusOne );