use references intead of pointers for njev/nfev

This commit is contained in:
Thomas Capricelli 2009-08-21 00:23:26 +02:00
parent 054652b789
commit 9294d33a11
12 changed files with 64 additions and 64 deletions

View File

@ -65,7 +65,7 @@ int ei_hybrd(
diag.data(), mode, diag.data(), mode,
factor, factor,
nprint, nprint,
&nfev, nfev,
fjac.data(), ldfjac, fjac.data(), ldfjac,
R.data(), lr, R.data(), lr,
qtf.data(), qtf.data(),
@ -108,8 +108,8 @@ int ei_hybrj(
diag.data(), mode, diag.data(), mode,
factor, factor,
nprint, nprint,
&nfev, nfev,
&njev, njev,
R.data(), lr, R.data(), lr,
qtf.data(), qtf.data(),
wa1.data(), wa2.data(), wa3.data(), wa4.data() wa1.data(), wa2.data(), wa3.data(), wa4.data()
@ -152,7 +152,7 @@ int ei_lmstr(
diag.data(), mode, diag.data(), mode,
factor, factor,
nprint, nprint,
&nfev, &njev, nfev, njev,
ipvt.data(), ipvt.data(),
qtf.data(), qtf.data(),
wa1.data(), wa2.data(), wa3.data(), wa4.data() wa1.data(), wa2.data(), wa3.data(), wa4.data()
@ -195,7 +195,7 @@ int ei_lmder(
diag.data(), mode, diag.data(), mode,
factor, factor,
nprint, nprint,
&nfev, &njev, nfev, njev,
ipvt.data(), ipvt.data(),
qtf.data(), qtf.data(),
wa1.data(), wa2.data(), wa3.data(), wa4.data() wa1.data(), wa2.data(), wa3.data(), wa4.data()
@ -239,7 +239,7 @@ int ei_lmdif(
diag.data(), mode, diag.data(), mode,
factor, factor,
nprint, nprint,
&nfev, nfev,
fjac.data() , ldfjac, fjac.data() , ldfjac,
ipvt.data(), ipvt.data(),
qtf.data(), qtf.data(),

View File

@ -2,7 +2,7 @@
template<typename Scalar> template<typename Scalar>
int hybrd_template(minpack_func_nn fcn, void *p, int n, Scalar *x, Scalar * int hybrd_template(minpack_func_nn fcn, void *p, int n, Scalar *x, Scalar *
fvec, Scalar xtol, int maxfev, int ml, int mu, fvec, Scalar xtol, int maxfev, int ml, int mu,
Scalar epsfcn, Scalar *diag, int mode, Scalar factor, int nprint, int *nfev, Scalar * Scalar epsfcn, Scalar *diag, int mode, Scalar factor, int nprint, int &nfev, Scalar *
fjac, int ldfjac, Scalar *r__, int lr, Scalar *qtf, fjac, int ldfjac, Scalar *r__, int lr, Scalar *qtf,
Scalar *wa1, Scalar *wa2, Scalar *wa3, Scalar *wa4) Scalar *wa1, Scalar *wa2, Scalar *wa3, Scalar *wa4)
{ {
@ -46,7 +46,7 @@ int hybrd_template(minpack_func_nn fcn, void *p, int n, Scalar *x, Scalar *
info = 0; info = 0;
iflag = 0; iflag = 0;
*nfev = 0; nfev = 0;
/* check the input parameters for errors. */ /* check the input parameters for errors. */
@ -69,7 +69,7 @@ L20:
/* and calculate its norm. */ /* and calculate its norm. */
iflag = (*fcn)(p, n, &x[1], &fvec[1], 1); iflag = (*fcn)(p, n, &x[1], &fvec[1], 1);
*nfev = 1; nfev = 1;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -98,7 +98,7 @@ L30:
iflag = fdjac1(fcn, p, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, iflag = fdjac1(fcn, p, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac,
ml, mu, epsfcn, &wa1[1], &wa2[1]); ml, mu, epsfcn, &wa1[1], &wa2[1]);
*nfev += msum; nfev += msum;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -243,7 +243,7 @@ L190:
/* evaluate the function at x + p and calculate its norm. */ /* evaluate the function at x + p and calculate its norm. */
iflag = (*fcn)(p, n, &wa2[1], &wa4[1], 1); iflag = (*fcn)(p, n, &wa2[1], &wa4[1], 1);
++(*nfev); ++(nfev);
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -343,7 +343,7 @@ L260:
/* tests for termination and stringent tolerances. */ /* tests for termination and stringent tolerances. */
if (*nfev >= maxfev) { if (nfev >= maxfev) {
info = 2; info = 2;
} }
/* Computing MAX */ /* Computing MAX */

View File

@ -7,7 +7,7 @@ int ei_hybrd1(
) )
{ {
const int n = x.size(); const int n = x.size();
int info, nfev; int info, nfev=0;
Matrix< Scalar, Dynamic, Dynamic > fjac; Matrix< Scalar, Dynamic, Dynamic > fjac;
Matrix< Scalar, Dynamic, 1> R, qtf, diag; Matrix< Scalar, Dynamic, 1> R, qtf, diag;

View File

@ -3,7 +3,7 @@ template<typename Scalar>
int hybrj_template(minpack_funcder_nn fcn, void *p, int n, Scalar *x, Scalar * int hybrj_template(minpack_funcder_nn fcn, void *p, int n, Scalar *x, Scalar *
fvec, Scalar *fjac, int ldfjac, Scalar xtol, int fvec, Scalar *fjac, int ldfjac, Scalar xtol, int
maxfev, Scalar *diag, int mode, Scalar factor, int maxfev, Scalar *diag, int mode, Scalar factor, int
nprint, int *nfev, int *njev, Scalar *r__, nprint, int &nfev, int &njev, Scalar *r__,
int lr, Scalar *qtf, Scalar *wa1, Scalar *wa2, int lr, Scalar *qtf, Scalar *wa1, Scalar *wa2,
Scalar *wa3, Scalar *wa4) Scalar *wa3, Scalar *wa4)
{ {
@ -47,8 +47,8 @@ int hybrj_template(minpack_funcder_nn fcn, void *p, int n, Scalar *x, Scalar *
info = 0; info = 0;
iflag = 0; iflag = 0;
*nfev = 0; nfev = 0;
*njev = 0; njev = 0;
/* check the input parameters for errors. */ /* check the input parameters for errors. */
@ -71,7 +71,7 @@ L20:
/* and calculate its norm. */ /* and calculate its norm. */
iflag = (*fcn)(p, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, 1); iflag = (*fcn)(p, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, 1);
*nfev = 1; nfev = 1;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -93,7 +93,7 @@ L30:
/* calculate the jacobian matrix. */ /* calculate the jacobian matrix. */
iflag = (*fcn)(p, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, 2); iflag = (*fcn)(p, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, 2);
++(*njev); ++njev;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -237,7 +237,7 @@ L190:
/* evaluate the function at x + p and calculate its norm. */ /* evaluate the function at x + p and calculate its norm. */
iflag = (*fcn)(p, n, &wa2[1], &wa4[1], &fjac[fjac_offset], ldfjac, 1); iflag = (*fcn)(p, n, &wa2[1], &wa4[1], &fjac[fjac_offset], ldfjac, 1);
++(*nfev); ++nfev;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -337,7 +337,7 @@ L260:
/* tests for termination and stringent tolerances. */ /* tests for termination and stringent tolerances. */
if (*nfev >= maxfev) { if (nfev >= maxfev) {
info = 2; info = 2;
} }
/* Computing MAX */ /* Computing MAX */

View File

@ -8,7 +8,7 @@ int ei_hybrj1(
) )
{ {
const int n = x.size(); const int n = x.size();
int info, nfev, njev; int info, nfev=0, njev=0;
Matrix< Scalar, Dynamic, 1> R, qtf, diag; Matrix< Scalar, Dynamic, 1> R, qtf, diag;
/* check the input parameters for errors. */ /* check the input parameters for errors. */

View File

@ -4,7 +4,7 @@ int lmder_template(minpack_funcder_mn fcn, void *p, int m, int n, Scalar *x,
Scalar *fvec, Scalar *fjac, int ldfjac, Scalar ftol, Scalar *fvec, Scalar *fjac, int ldfjac, Scalar ftol,
Scalar xtol, Scalar gtol, int maxfev, Scalar * Scalar xtol, Scalar gtol, int maxfev, Scalar *
diag, int mode, Scalar factor, int nprint, diag, int mode, Scalar factor, int nprint,
int *nfev, int *njev, int *ipvt, Scalar *qtf, int &nfev, int &njev, int *ipvt, Scalar *qtf,
Scalar *wa1, Scalar *wa2, Scalar *wa3, Scalar *wa4) Scalar *wa1, Scalar *wa2, Scalar *wa3, Scalar *wa4)
{ {
/* Initialized data */ /* Initialized data */
@ -40,8 +40,8 @@ int lmder_template(minpack_funcder_mn fcn, void *p, int m, int n, Scalar *x,
info = 0; info = 0;
iflag = 0; iflag = 0;
*nfev = 0; nfev = 0;
*njev = 0; njev = 0;
/* check the input parameters for errors. */ /* check the input parameters for errors. */
@ -64,7 +64,7 @@ L20:
/* and calculate its norm. */ /* and calculate its norm. */
iflag = (*fcn)(p, m, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, 1); iflag = (*fcn)(p, m, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, 1);
*nfev = 1; nfev = 1;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -82,7 +82,7 @@ L30:
/* calculate the jacobian matrix. */ /* calculate the jacobian matrix. */
iflag = (*fcn)(p, m, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, 2); iflag = (*fcn)(p, m, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, 2);
++(*njev); ++njev;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -235,7 +235,7 @@ L200:
/* evaluate the function at x + p and calculate its norm. */ /* evaluate the function at x + p and calculate its norm. */
iflag = (*fcn)(p, m, n, &wa2[1], &wa4[1], &fjac[fjac_offset], ldfjac, 1); iflag = (*fcn)(p, m, n, &wa2[1], &wa4[1], &fjac[fjac_offset], ldfjac, 1);
++(*nfev); ++nfev;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -341,7 +341,7 @@ L290:
/* tests for termination and stringent tolerances. */ /* tests for termination and stringent tolerances. */
if (*nfev >= maxfev) { if (nfev >= maxfev) {
info = 5; info = 5;
} }
if (ei_abs(actred) <= epsilon<Scalar>() && prered <= epsilon<Scalar>() && p5 * ratio <= 1.) { if (ei_abs(actred) <= epsilon<Scalar>() && prered <= epsilon<Scalar>() && p5 * ratio <= 1.) {

View File

@ -8,7 +8,7 @@ int ei_lmder1(
) )
{ {
const int n = x.size(), m=fvec.size(); const int n = x.size(), m=fvec.size();
int info, nfev, njev; int info, nfev=0, njev=0;
Matrix< Scalar, Dynamic, Dynamic > fjac(m, n); Matrix< Scalar, Dynamic, Dynamic > fjac(m, n);
Matrix< Scalar, Dynamic, 1> diag; Matrix< Scalar, Dynamic, 1> diag;

View File

@ -3,8 +3,8 @@ template<typename Scalar>
int lmdif_template(minpack_func_mn fcn, void *p, int m, int n, Scalar *x, int lmdif_template(minpack_func_mn fcn, void *p, int m, int n, Scalar *x,
Scalar *fvec, Scalar ftol, Scalar xtol, Scalar gtol, Scalar *fvec, Scalar ftol, Scalar xtol, Scalar gtol,
int maxfev, Scalar epsfcn, Scalar *diag, int int maxfev, Scalar epsfcn, Scalar *diag, int
mode, Scalar factor, int nprint, int * mode, Scalar factor, int nprint, int &nfev,
nfev, Scalar *fjac, int ldfjac, int *ipvt, Scalar * Scalar *fjac, int ldfjac, int *ipvt, Scalar *
qtf, Scalar *wa1, Scalar *wa2, Scalar *wa3, Scalar * qtf, Scalar *wa1, Scalar *wa2, Scalar *wa3, Scalar *
wa4) wa4)
{ {
@ -42,7 +42,7 @@ int lmdif_template(minpack_func_mn fcn, void *p, int m, int n, Scalar *x,
info = 0; info = 0;
iflag = 0; iflag = 0;
*nfev = 0; nfev = 0;
/* check the input parameters for errors. */ /* check the input parameters for errors. */
@ -65,7 +65,7 @@ L20:
/* and calculate its norm. */ /* and calculate its norm. */
iflag = (*fcn)(p, m, n, &x[1], &fvec[1], 1); iflag = (*fcn)(p, m, n, &x[1], &fvec[1], 1);
*nfev = 1; nfev = 1;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -84,7 +84,7 @@ L30:
iflag = fdjac2(fcn, p, m, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, iflag = fdjac2(fcn, p, m, n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac,
epsfcn, &wa4[1]); epsfcn, &wa4[1]);
*nfev += n; nfev += n;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -237,7 +237,7 @@ L200:
/* evaluate the function at x + p and calculate its norm. */ /* evaluate the function at x + p and calculate its norm. */
iflag = (*fcn)(p, m, n, &wa2[1], &wa4[1], 1); iflag = (*fcn)(p, m, n, &wa2[1], &wa4[1], 1);
++(*nfev); ++nfev;
if (iflag < 0) { if (iflag < 0) {
goto L300; goto L300;
} }
@ -343,7 +343,7 @@ L290:
/* tests for termination and stringent tolerances. */ /* tests for termination and stringent tolerances. */
if (*nfev >= maxfev) { if (nfev >= maxfev) {
info = 5; info = 5;
} }
if (ei_abs(actred) <= epsilon<Scalar>() && prered <= epsilon<Scalar>() && p5 * ratio <= 1.) { if (ei_abs(actred) <= epsilon<Scalar>() && prered <= epsilon<Scalar>() && p5 * ratio <= 1.) {

View File

@ -7,7 +7,7 @@ int ei_lmdif1(
) )
{ {
const int n = x.size(), m=fvec.size(); const int n = x.size(), m=fvec.size();
int info, nfev; int info, nfev=0;
Matrix< Scalar, Dynamic, Dynamic > fjac(m, n); Matrix< Scalar, Dynamic, Dynamic > fjac(m, n);
Matrix< Scalar, Dynamic, 1> diag, qtf; Matrix< Scalar, Dynamic, 1> diag, qtf;
VectorXi ipvt; VectorXi ipvt;

View File

@ -4,7 +4,7 @@ int lmstr_template(minpack_funcderstr_mn fcn, void *p, int m, int n, Scalar *x,
Scalar *fvec, Scalar *fjac, int ldfjac, Scalar ftol, Scalar *fvec, Scalar *fjac, int ldfjac, Scalar ftol,
Scalar xtol, Scalar gtol, int maxfev, Scalar * Scalar xtol, Scalar gtol, int maxfev, Scalar *
diag, int mode, Scalar factor, int nprint, diag, int mode, Scalar factor, int nprint,
int *nfev, int *njev, int *ipvt, Scalar *qtf, int &nfev, int &njev, int *ipvt, Scalar *qtf,
Scalar *wa1, Scalar *wa2, Scalar *wa3, Scalar *wa4) Scalar *wa1, Scalar *wa2, Scalar *wa3, Scalar *wa4)
{ {
/* Initialized data */ /* Initialized data */
@ -41,8 +41,8 @@ int lmstr_template(minpack_funcderstr_mn fcn, void *p, int m, int n, Scalar *x,
info = 0; info = 0;
iflag = 0; iflag = 0;
*nfev = 0; nfev = 0;
*njev = 0; njev = 0;
/* check the input parameters for errors. */ /* check the input parameters for errors. */
@ -65,7 +65,7 @@ L20:
/* and calculate its norm. */ /* and calculate its norm. */
iflag = (*fcn)(p, m, n, &x[1], &fvec[1], &wa3[1], 1); iflag = (*fcn)(p, m, n, &x[1], &fvec[1], &wa3[1], 1);
*nfev = 1; nfev = 1;
if (iflag < 0) { if (iflag < 0) {
goto L340; goto L340;
} }
@ -118,7 +118,7 @@ L40:
++iflag; ++iflag;
/* L70: */ /* L70: */
} }
++(*njev); ++njev;
/* if the jacobian is rank deficient, call qrfac to */ /* if the jacobian is rank deficient, call qrfac to */
/* reorder its columns and update the components of qtf. */ /* reorder its columns and update the components of qtf. */
@ -259,7 +259,7 @@ L240:
/* evaluate the function at x + p and calculate its norm. */ /* evaluate the function at x + p and calculate its norm. */
iflag = (*fcn)(p, m, n, &wa2[1], &wa4[1], &wa3[1], 1); iflag = (*fcn)(p, m, n, &wa2[1], &wa4[1], &wa3[1], 1);
++(*nfev); ++nfev;
if (iflag < 0) { if (iflag < 0) {
goto L340; goto L340;
} }
@ -366,7 +366,7 @@ L330:
/* tests for termination and stringent tolerances. */ /* tests for termination and stringent tolerances. */
if (*nfev >= maxfev) { if (nfev >= maxfev) {
info = 5; info = 5;
} }
if (ei_abs(actred) <= epsilon<Scalar>() && prered <= epsilon<Scalar>() && p5 * ratio <= 1.) { if (ei_abs(actred) <= epsilon<Scalar>() && prered <= epsilon<Scalar>() && p5 * ratio <= 1.) {

View File

@ -8,7 +8,7 @@ int ei_lmstr1(
) )
{ {
const int n = x.size(), m=fvec.size(); const int n = x.size(), m=fvec.size();
int info, nfev, njev; int info, nfev=0, njev=0;
Matrix< Scalar, Dynamic, Dynamic > fjac(m, n); Matrix< Scalar, Dynamic, Dynamic > fjac(m, n);
Matrix< Scalar, Dynamic, 1> diag; Matrix< Scalar, Dynamic, 1> diag;

View File

@ -216,7 +216,7 @@ struct lmder_functor {
void testLmder() void testLmder()
{ {
const int m=15, n=3; const int m=15, n=3;
int info, nfev, njev; int info, nfev=0, njev=0;
double fnorm, covfac, covar_ftol; double fnorm, covfac, covar_ftol;
VectorXd x(n), fvec(m), diag(n); VectorXd x(n), fvec(m), diag(n);
MatrixXd fjac; MatrixXd fjac;
@ -379,7 +379,7 @@ struct hybrj_functor {
void testHybrj() void testHybrj()
{ {
const int n=9; const int n=9;
int info, nfev, njev, mode; int info, nfev=0, njev=0, mode;
VectorXd x(n), fvec, diag(n), R, qtf; VectorXd x(n), fvec, diag(n), R, qtf;
MatrixXd fjac; MatrixXd fjac;
@ -485,7 +485,7 @@ struct hybrd_functor {
void testHybrd() void testHybrd()
{ {
const int n=9; const int n=9;
int info, nfev, ml, mu, mode; int info, nfev=0, ml, mu, mode;
VectorXd x(n), fvec, diag(n), R, qtf; VectorXd x(n), fvec, diag(n), R, qtf;
MatrixXd fjac; MatrixXd fjac;
@ -624,7 +624,7 @@ struct lmstr_functor {
void testLmstr() void testLmstr()
{ {
const int m=15, n=3; const int m=15, n=3;
int info, nfev, njev; int info, nfev=0, njev=0;
double fnorm; double fnorm;
VectorXd x(n), fvec(m), diag(n); VectorXd x(n), fvec(m), diag(n);
MatrixXd fjac; MatrixXd fjac;
@ -732,7 +732,7 @@ struct lmdif_functor {
void testLmdif() void testLmdif()
{ {
const int m=15, n=3; const int m=15, n=3;
int info, nfev; int info, nfev=0;
double fnorm, covfac, covar_ftol; double fnorm, covfac, covar_ftol;
VectorXd x(n), fvec(m), diag(n), qtf; VectorXd x(n), fvec(m), diag(n), qtf;
MatrixXd fjac; MatrixXd fjac;
@ -812,7 +812,7 @@ struct chwirut2_functor {
void testNistChwirut2(void) void testNistChwirut2(void)
{ {
const int m=54, n=3; const int m=54, n=3;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -886,7 +886,7 @@ struct misra1a_functor {
void testNistMisra1a(void) void testNistMisra1a(void)
{ {
const int m=14, n=2; const int m=14, n=2;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -966,7 +966,7 @@ struct hahn1_functor {
void testNistHahn1(void) void testNistHahn1(void)
{ {
const int m=236, n=7; const int m=236, n=7;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1048,7 +1048,7 @@ struct misra1d_functor {
void testNistMisra1d(void) void testNistMisra1d(void)
{ {
const int m=14, n=2; const int m=14, n=2;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1123,7 +1123,7 @@ struct lanczos1_functor {
void testNistLanczos1(void) void testNistLanczos1(void)
{ {
const int m=24, n=6; const int m=24, n=6;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1204,7 +1204,7 @@ struct rat42_functor {
void testNistRat42(void) void testNistRat42(void)
{ {
const int m=9, n=3; const int m=9, n=3;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1279,7 +1279,7 @@ struct MGH10_functor {
void testNistMGH10(void) void testNistMGH10(void)
{ {
const int m=16, n=3; const int m=16, n=3;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1353,7 +1353,7 @@ struct BoxBOD_functor {
void testNistBoxBOD(void) void testNistBoxBOD(void)
{ {
const int m=6, n=2; const int m=6, n=2;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1428,7 +1428,7 @@ struct MGH17_functor {
void testNistMGH17(void) void testNistMGH17(void)
{ {
const int m=33, n=5; const int m=33, n=5;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1513,7 +1513,7 @@ struct MGH09_functor {
void testNistMGH09(void) void testNistMGH09(void)
{ {
const int m=11, n=4; const int m=11, n=4;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1594,7 +1594,7 @@ struct Bennett5_functor {
void testNistBennett5(void) void testNistBennett5(void)
{ {
const int m=154, n=3; const int m=154, n=3;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1676,7 +1676,7 @@ struct thurber_functor {
void testNistThurber(void) void testNistThurber(void)
{ {
const int m=37, n=7; const int m=37, n=7;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1762,7 +1762,7 @@ struct rat43_functor {
void testNistRat43(void) void testNistRat43(void)
{ {
const int m=15, n=4; const int m=15, n=4;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;
@ -1844,7 +1844,7 @@ struct eckerle4_functor {
void testNistEckerle4(void) void testNistEckerle4(void)
{ {
const int m=35, n=3; const int m=35, n=3;
int info, nfev, njev; int info, nfev=0, njev=0;
VectorXd x(n), fvec(m), diag; VectorXd x(n), fvec(m), diag;
MatrixXd fjac; MatrixXd fjac;