Home | History | Annotate | Download | only in examples

Lines Matching refs:x4

36 //   f2 = sqrt(5) * (x3 - x4)
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.
70 const T* const x4,
72 // f2 = sqrt(5) (x3 - x4)
73 residual[0] = T(sqrt(5.0)) * (x3[0] - x4[0]);
80 const T* const x4,
83 residual[0] = (x2[0] - T(2.0) * x4[0]) * (x2[0] - T(2.0) * x4[0]);
90 const T* const x4,
92 // f4 = sqrt(10) (x1 - x4)^2
93 residual[0] = T(sqrt(10.0)) * (x1[0] - x4[0]) * (x1[0] - x4[0]);
108 double x4 = 1.0;
113 // x4, are modified in place.
119 &x3, &x4);
125 &x1, &x4);
140 << ", x4 = " << x4
151 << ", x4 = " << x4