kill yet another un-needed parameter

This commit is contained in:
Thomas Capricelli 2009-11-26 05:48:38 +01:00
parent 905aecf803
commit db39f892a3
2 changed files with 4 additions and 6 deletions

View File

@ -320,7 +320,7 @@ LevenbergMarquardt<FunctorType,Scalar>::minimizeOneStep(
/* determine the levenberg-marquardt parameter. */ /* determine the levenberg-marquardt parameter. */
ei_lmpar<Scalar>(fjac, ipvt, diag, qtf, delta, par, wa1, wa2); ei_lmpar<Scalar>(fjac, ipvt, diag, qtf, delta, par, wa1);
/* store the direction p and x + p. calculate the norm of p. */ /* store the direction p and x + p. calculate the norm of p. */
@ -433,8 +433,6 @@ LevenbergMarquardt<FunctorType,Scalar>::lmstr1(
{ {
n = x.size(); n = x.size();
m = functor.values(); m = functor.values();
JacobianType fjac(m, n);
VectorXi ipvt;
/* check the input parameters for errors. */ /* check the input parameters for errors. */
if (n <= 0 || m < n || tol < 0.) if (n <= 0 || m < n || tol < 0.)
@ -605,7 +603,7 @@ LevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorageOneStep(
/* determine the levenberg-marquardt parameter. */ /* determine the levenberg-marquardt parameter. */
ei_lmpar<Scalar>(fjac, ipvt, diag, qtf, delta, par, wa1, wa2); ei_lmpar<Scalar>(fjac, ipvt, diag, qtf, delta, par, wa1);
/* store the direction p and x + p. calculate the norm of p. */ /* store the direction p and x + p. calculate the norm of p. */

View File

@ -7,8 +7,7 @@ void ei_lmpar(
const Matrix< Scalar, Dynamic, 1 > &qtb, const Matrix< Scalar, Dynamic, 1 > &qtb,
Scalar delta, Scalar delta,
Scalar &par, Scalar &par,
Matrix< Scalar, Dynamic, 1 > &x, Matrix< Scalar, Dynamic, 1 > &x)
Matrix< Scalar, Dynamic, 1 > &sdiag)
{ {
/* Local variables */ /* Local variables */
int i, j, k, l; int i, j, k, l;
@ -122,6 +121,7 @@ void ei_lmpar(
temp = ei_sqrt(par); temp = ei_sqrt(par);
wa1 = temp * diag; wa1 = temp * diag;
Matrix< Scalar, Dynamic, 1 > sdiag(n);
ei_qrsolv<Scalar>(r, ipvt, wa1, qtb, x, sdiag); ei_qrsolv<Scalar>(r, ipvt, wa1, qtb, x, sdiag);
wa2 = diag.cwise() * x; wa2 = diag.cwise() * x;