From f01332043b7098bacc381695661b1ef67ddf60a8 Mon Sep 17 00:00:00 2001 From: Thomas Capricelli Date: Sun, 23 Aug 2009 05:56:12 +0200 Subject: [PATCH] only indentation --- unsupported/Eigen/src/NonLinear/fdjac1.h | 90 ++++++++++++------------ unsupported/Eigen/src/NonLinear/fdjac2.h | 38 +++++----- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/unsupported/Eigen/src/NonLinear/fdjac1.h b/unsupported/Eigen/src/NonLinear/fdjac1.h index 9e9baf4a3..b9ec75bd4 100644 --- a/unsupported/Eigen/src/NonLinear/fdjac1.h +++ b/unsupported/Eigen/src/NonLinear/fdjac1.h @@ -23,67 +23,67 @@ int ei_fdjac1( eps = ei_sqrt((std::max(epsfcn,epsmch))); msum = ml + mu + 1; if (msum < n) { - goto L40; + goto L40; } -/* computation of dense approximate jacobian. */ + /* computation of dense approximate jacobian. */ for (j = 0; j < n; ++j) { - temp = x[j]; - h = eps * ei_abs(temp); - if (h == 0.) - h = eps; - x[j] = temp + h; - iflag = Functor::f(x, wa1); - if (iflag < 0) - goto L30; - x[j] = temp; - for (i = 0; i < n; ++i) { - fjac(i,j) = (wa1[i] - fvec[i]) / h; -/* L10: */ - } -/* L20: */ + temp = x[j]; + h = eps * ei_abs(temp); + if (h == 0.) + h = eps; + x[j] = temp + h; + iflag = Functor::f(x, wa1); + if (iflag < 0) + goto L30; + x[j] = temp; + for (i = 0; i < n; ++i) { + fjac(i,j) = (wa1[i] - fvec[i]) / h; + /* L10: */ + } + /* L20: */ } L30: /* goto L110; */ return iflag; L40: -/* computation of banded approximate jacobian. */ + /* computation of banded approximate jacobian. */ for (k = 0; k < msum; ++k) { - for (j = k; msum< 0 ? j > n: j < n; j += msum) { - wa2[j] = x[j]; - h = eps * ei_abs(wa2[j]); - if (h == 0.) h = eps; - x[j] = wa2[j] + h; -/* L60: */ - } - iflag = Functor::f(x, wa1); - if (iflag < 0) { - /* goto L100; */ + for (j = k; msum< 0 ? j > n: j < n; j += msum) { + wa2[j] = x[j]; + h = eps * ei_abs(wa2[j]); + if (h == 0.) h = eps; + x[j] = wa2[j] + h; + /* L60: */ + } + iflag = Functor::f(x, wa1); + if (iflag < 0) { + /* goto L100; */ return iflag; - } - for (j = k; msum< 0 ? j > n: j < n; j += msum) { - x[j] = wa2[j]; - h = eps * ei_abs(wa2[j]); - if (h == 0.) h = eps; - for (i = 0; i < n; ++i) { - fjac(i,j) = 0.; - if (i >= j - mu && i <= j + ml) { - fjac(i,j) = (wa1[i] - fvec[i]) / h; - } -/* L70: */ - } -/* L80: */ - } -/* L90: */ + } + for (j = k; msum< 0 ? j > n: j < n; j += msum) { + x[j] = wa2[j]; + h = eps * ei_abs(wa2[j]); + if (h == 0.) h = eps; + for (i = 0; i < n; ++i) { + fjac(i,j) = 0.; + if (i >= j - mu && i <= j + ml) { + fjac(i,j) = (wa1[i] - fvec[i]) / h; + } + /* L70: */ + } + /* L80: */ + } + /* L90: */ } -/* L100: */ -/* L110: */ + /* L100: */ + /* L110: */ return iflag; -/* last card of subroutine fdjac1. */ + /* last card of subroutine fdjac1. */ } /* fdjac1_ */ diff --git a/unsupported/Eigen/src/NonLinear/fdjac2.h b/unsupported/Eigen/src/NonLinear/fdjac2.h index fcd986a95..fd6cf1d8b 100644 --- a/unsupported/Eigen/src/NonLinear/fdjac2.h +++ b/unsupported/Eigen/src/NonLinear/fdjac2.h @@ -4,7 +4,7 @@ int ei_fdjac2( Matrix< Scalar, Dynamic, 1 > &x, Matrix< Scalar, Dynamic, 1 > &fvec, Matrix< Scalar, Dynamic, Dynamic > &fjac, - Scalar epsfcn, + Scalar epsfcn, Matrix< Scalar, Dynamic, 1 > &wa) { /* Local variables */ @@ -20,28 +20,28 @@ int ei_fdjac2( eps = ei_sqrt((std::max(epsfcn,epsmch))); for (j = 0; j < n; ++j) { - temp = x[j]; - h = eps * ei_abs(temp); - if (h == 0.) { - h = eps; - } - x[j] = temp + h; - iflag = Functor::f(x, wa); - if (iflag < 0) { - /* goto L30; */ + temp = x[j]; + h = eps * ei_abs(temp); + if (h == 0.) { + h = eps; + } + x[j] = temp + h; + iflag = Functor::f(x, wa); + if (iflag < 0) { + /* goto L30; */ return iflag; - } - x[j] = temp; - for (i = 0; i < m; ++i) { - fjac(i,j) = (wa[i] - fvec[i]) / h; -/* L10: */ - } -/* L20: */ + } + x[j] = temp; + for (i = 0; i < m; ++i) { + fjac(i,j) = (wa[i] - fvec[i]) / h; + /* L10: */ + } + /* L20: */ } -/* L30: */ + /* L30: */ return iflag; -/* last card of subroutine fdjac2. */ + /* last card of subroutine fdjac2. */ } /* fdjac2_ */