Home | History | Annotate | Download | only in examples

Lines Matching defs:x2

35 //   f1 = x1 + 10*x2;
37 // f3 = (x2 - 2*x3)^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 const T* const x2,
62 // f1 = x1 + 10 * x2;
63 residual[0] = x1[0] + T(10.0) * x2[0];
79 template <typename T> bool operator()(const T* const x2,
82 // f3 = (x2 - 2 x3)^2
83 residual[0] = (x2[0] - T(2.0) * x4[0]) * (x2[0] - T(2.0) * x4[0]);
106 double x2 = -1.0;
116 &x1, &x2);
122 &x2, &x3);
138 << ", x2 = " << x2
149 << ", x2 = " << x2