Home | History | Annotate | Download | only in examples

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.
59 template <typename T> bool operator()(const T* const x1,
62 // f1 = x1 + 10 * x2;
63 residual[0] = x1[0] + T(10.0) * x2[0];
89 template <typename T> bool operator()(const T* const x1,
92 // f4 = sqrt(10) (x1 - x4)^2
93 residual[0] = T(sqrt(10.0)) * (x1[0] - x4[0]) * (x1[0] - x4[0]);
105 double x1 = 3.0;
112 // wrapper to get the derivatives automatically. The parameters, x1 through
116 &x1, &x2);
125 &x1, &x4);
137 std::cout << "Initial x1 = " << x1
148 std::cout << "Final x1 = " << x1