aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/src/NonLinear/hybrd.h
diff options
context:
space:
mode:
authorGravatar Thomas Capricelli <orzel@freehackers.org>2009-08-24 08:28:31 +0200
committerGravatar Thomas Capricelli <orzel@freehackers.org>2009-08-24 08:28:31 +0200
commit950eb4a2544eee2b1bcc70c7c5e9e9f945eb574f (patch)
treeb002a3f44a999f5af087c54cbb707f5364200400 /unsupported/Eigen/src/NonLinear/hybrd.h
parent930651ff9a6318c8f6edcc36a15ca25edafdce56 (diff)
various cleaning and homogeneization
Diffstat (limited to 'unsupported/Eigen/src/NonLinear/hybrd.h')
-rw-r--r--unsupported/Eigen/src/NonLinear/hybrd.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/unsupported/Eigen/src/NonLinear/hybrd.h b/unsupported/Eigen/src/NonLinear/hybrd.h
index 987373cb6..183b2a9cb 100644
--- a/unsupported/Eigen/src/NonLinear/hybrd.h
+++ b/unsupported/Eigen/src/NonLinear/hybrd.h
@@ -192,19 +192,16 @@ L170:
/* beginning of the inner loop. */
L180:
-
- /* if requested, call fcn to enable printing of iterates. */
+ /* if requested, call Functor::f to enable printing of iterates. */
if (nprint <= 0) {
goto L190;
}
iflag = 0;
- if ((iter - 1) % nprint == 0) {
+ if ((iter - 1) % nprint == 0)
iflag = Functor::debug(x, fvec);
- }
- if (iflag < 0) {
+ if (iflag < 0)
goto L300;
- }
L190:
/* determine the direction p. */
@@ -220,17 +217,15 @@ L190:
/* on the first iteration, adjust the initial step bound. */
- if (iter == 1) {
+ if (iter == 1)
delta = std::min(delta,pnorm);
- }
/* evaluate the function at x + p and calculate its norm. */
iflag = Functor::f(wa2, wa4);
++nfev;
- if (iflag < 0) {
+ if (iflag < 0)
goto L300;
- }
fnorm1 = wa4.stableNorm();
/* compute the scaled actual reduction. */
@@ -295,7 +290,7 @@ L240:
x = wa2;
wa2 = diag.cwise() * x;
fvec = wa4;
- temp = wa2.stableNorm();
+ xnorm = wa2.stableNorm();
fnorm = fnorm1;
++iter;
L260:
@@ -376,12 +371,8 @@ L300:
if (iflag < 0) {
info = iflag;
}
- if (nprint > 0) {
+ if (nprint > 0)
iflag = Functor::debug(x, fvec);
- }
return info;
-
- /* last card of subroutine hybrd. */
-
-} /* hybrd_ */
+}