22 #ifndef UNFIT_EXAMPLES_POWELL_HPP_ 23 #define UNFIT_EXAMPLES_POWELL_HPP_ 26 #include "GenericCostFunction.hpp" 58 :
n_ {(n < 2) ? 2 : (n - n%2)}
70 std::vector<double>
operator()(
const std::vector<double> ¶m)
72 std::vector<double> residuals(
n_);
73 for (
auto i = 0u; i <
n_; i+=2) {
74 residuals[i] = param[0];
75 residuals[i+1] = 10.0*param[0] / (param[0] + 0.1) + 2.0*param[1]*param[1];
std::vector< double > operator()(const std::vector< double > ¶m)
Definition: Powell.hpp:70
Implements the Powell function.
Definition: Powell.hpp:44
Definition: Bounds.hpp:27
Powell(unsigned n)
Definition: Powell.hpp:57
Definition: GenericCostFunction.hpp:36
const unsigned n_
Definition: Powell.hpp:81