Lines Matching refs:x1
35 // f1 = x1 + 10*x2;
38 // f4 = sqrt(10) * (x1 - x4)^2
40 // The starting values are x1 = 3, x2 = -1, x3 = 0, x4 = 1.
41 // The minimum is 0 at (x1, x2, x3, x4) = 0.
60 template <typename T> bool operator()(const T* const x1,
63 // f1 = x1 + 10 * x2;
64 residual[0] = x1[0] + T(10.0) * x2[0];
93 template <typename T> bool operator()(const T* const x1,
96 // f4 = sqrt(10) (x1 - x4)^2
97 residual[0] = T(sqrt(10.0)) * (x1[0] - x4[0]) * (x1[0] - x4[0]);
106 double x1 = 3.0;
113 // wrapper to get the derivatives automatically. The parameters, x1 through
117 &x1, &x2);
126 &x1, &x4);
136 std::cout << "Initial x1 = " << x1
145 std::cout << "Final x1 = " << x1