rearranging comments

release/4.3a0
Luca 2014-02-20 15:36:11 -05:00
parent a0bc4b0a5a
commit 7e8bb1ffb0
1 changed files with 7 additions and 10 deletions

View File

@ -200,6 +200,12 @@ void LevenbergMarquardtOptimizer::iterate() {
// checking similarity between change in original and linearized cost // checking similarity between change in original and linearized cost
modelFidelity = costChange / linearizedCostChange; modelFidelity = costChange / linearizedCostChange;
// cout << "current error " << state_.error << endl;
// cout << "new error " << error << endl;
// cout << "costChange " << costChange << endl;
// cout << "linearizedCostChange " << linearizedCostChange << endl;
// cout << "modelFidelity " << modelFidelity << endl;
if (error < state_.error) { if (error < state_.error) {
state_.values.swap(newValues); state_.values.swap(newValues);
state_.error = error; state_.error = error;
@ -226,11 +232,6 @@ void LevenbergMarquardtOptimizer::iterate() {
} }
// bool converged = checkConvergence(_params().relativeErrorTol, _params().absoluteErrorTol, _params().errorTol, state_.error, error); // bool converged = checkConvergence(_params().relativeErrorTol, _params().absoluteErrorTol, _params().errorTol, state_.error, error);
// cout << " Inner iteration - converged " << converged << endl; // cout << " Inner iteration - converged " << converged << endl;
// cout << "current error " << state_.error << endl;
// cout << "new error " << error << endl;
// cout << "costChange " << costChange << endl;
// cout << "linearizedCostChange " << linearizedCostChange << endl;
// cout << "modelFidelity " << modelFidelity << endl;
} }
} catch (IndeterminantLinearSystemException& e) { } catch (IndeterminantLinearSystemException& e) {
(void) e; // Prevent unused variable warning (void) e; // Prevent unused variable warning
@ -247,14 +248,10 @@ void LevenbergMarquardtOptimizer::iterate() {
} else { } else {
increaseLambda(modelFidelity); increaseLambda(modelFidelity);
} }
} } // Frank asks: why would we do that? catch(...) { throw; }
if(params_.disableInnerIterations) if(params_.disableInnerIterations)
break; break;
// Frank asks: why would we do that?
// catch(...) {
// throw;
// }
} // end while } // end while
if (lmVerbosity >= LevenbergMarquardtParams::LAMBDA) if (lmVerbosity >= LevenbergMarquardtParams::LAMBDA)