Lines Matching refs:rho
44 // If rho[1] is zero, the Corrector constructor should crash.
51 // If rho[1] is negative, the Corrector constructor should crash.
65 // In light of the rho'' < 0 clamping now implemented in
66 // corrector.cc, alpha = 0 whenever rho'' < 0.
121 // rho[2] < 0 -> alpha = 0.0
130 // sqrt(rho[1]) * (1 - alpha) * J.
148 double rho[3];
178 rho[0] = sq_norm;
179 rho[1] = RandDouble();
180 rho[2] = 2.0 * RandDouble() - 1.0;
182 // If rho[2] > 0, then the curvature correction to the correction
186 const double kD = 1 + 2 * rho[2] / rho[1] * sq_norm;
187 const double kAlpha = (rho[2] > 0.0) ? 1 - sqrt(kD) : 0.0;
190 g_res = sqrt(rho[1]) / (1.0 - kAlpha) * res;
191 g_jac = sqrt(rho[1]) * (jac - kAlpha / sq_norm *
194 g_grad = rho[1] * jac.transpose() * res;
195 g_hess = rho[1] * jac.transpose() * jac +
196 2.0 * rho[2] * jac.transpose() * res * res.transpose() * jac;
198 Corrector c(sq_norm, rho);
216 double rho[3];
247 rho[0] = sq_norm;
248 rho[1] = RandDouble();
249 rho[2] = 2 * RandDouble() - 1.0;
252 g_res = sqrt(rho[1]) * res;
253 g_jac = sqrt(rho[1]) * jac;
255 g_grad = rho[1] * jac.transpose() * res;
256 g_hess = rho[1] * jac.transpose() * jac +
257 2.0 * rho[2] * jac.transpose() * res * res.transpose() * jac;
259 Corrector c(sq_norm, rho);