This commit is contained in:
Thomas Capricelli 2010-01-26 01:59:32 +01:00
parent c759814f11
commit 4b859c8554
2 changed files with 7 additions and 10 deletions

View File

@ -286,11 +286,6 @@ HybridNonLinearSolver<FunctorType,Scalar>::solveOneStep(
/* accumulate the orthogonal factor in fjac. */
ei_qform<Scalar>(n, n, fjac.data(), fjac.rows(), wa1.data());
#if 0
std::cout << "ei_qform<Scalar>: " << fjac << std::endl;
fjac = qrfac.matrixQ();
std::cout << "qrfac.matrixQ():" << fjac << std::endl;
#endif
/* rescale if necessary. */

View File

@ -286,6 +286,13 @@ LevenbergMarquardt<FunctorType,Scalar>::minimizeOneStep(
/* form (q transpose)*fvec and store the first n components in */
/* qtf. */
#if 0
// find a way to only compute the first n items, we have m>>n here.
wa4 = fvec;
wa4.applyOnTheLeft(qrfac.householderQ().adjoint());
wa4 = wa4.head(n);
fjac.diagonal() = wa1;
#else
wa4 = fvec;
for (j = 0; j < n; ++j) {
if (fjac(j,j) != 0.) {
@ -299,11 +306,6 @@ LevenbergMarquardt<FunctorType,Scalar>::minimizeOneStep(
fjac(j,j) = wa1[j];
qtf[j] = wa4[j];
}
#if 0
std::cout << "qtf: " << qtf << std::endl;
FVectorType monqtf = qrfac.matrixQ().transpose() * fvec;
std::cout << "mon qtf :" << monqtf << std::endl;
#endif
/* compute the norm of the scaled gradient. */