Some comments
parent
91ea8e3bd7
commit
a4aa7b9f45
|
@ -128,7 +128,8 @@ namespace gtsam {
|
||||||
OptionalOrderingType orderingType = boost::none) const;
|
OptionalOrderingType orderingType = boost::none) const;
|
||||||
|
|
||||||
/** Do multifrontal elimination of all variables to produce a Bayes tree. If an ordering is not
|
/** Do multifrontal elimination of all variables to produce a Bayes tree. If an ordering is not
|
||||||
* provided, the ordering provided by COLAMD will be used.
|
* provided, the ordering will be computed using either COLAMD or METIS, dependeing on
|
||||||
|
* the parameter orderingType (Ordering::COLAMD or Ordering::METIS)
|
||||||
*
|
*
|
||||||
* <b> Example - Full Cholesky elimination in COLAMD order: </b>
|
* <b> Example - Full Cholesky elimination in COLAMD order: </b>
|
||||||
* \code
|
* \code
|
||||||
|
|
|
@ -242,8 +242,10 @@ void LevenbergMarquardtOptimizer::iterate() {
|
||||||
|
|
||||||
bool systemSolvedSuccessfully;
|
bool systemSolvedSuccessfully;
|
||||||
try {
|
try {
|
||||||
|
// ============ Solve is where most computation happens !! =================
|
||||||
delta = solve(dampedSystem, state_.values, params_);
|
delta = solve(dampedSystem, state_.values, params_);
|
||||||
systemSolvedSuccessfully = true;
|
systemSolvedSuccessfully = true;
|
||||||
|
// =========================================================================
|
||||||
} catch (IndeterminantLinearSystemException) {
|
} catch (IndeterminantLinearSystemException) {
|
||||||
systemSolvedSuccessfully = false;
|
systemSolvedSuccessfully = false;
|
||||||
}
|
}
|
||||||
|
@ -267,7 +269,9 @@ void LevenbergMarquardtOptimizer::iterate() {
|
||||||
if (linearizedCostChange >= 0) { // step is valid
|
if (linearizedCostChange >= 0) { // step is valid
|
||||||
// update values
|
// update values
|
||||||
gttic(retract);
|
gttic(retract);
|
||||||
|
// ============ This is where the solution is updated ====================
|
||||||
newValues = state_.values.retract(delta);
|
newValues = state_.values.retract(delta);
|
||||||
|
// =======================================================================
|
||||||
gttoc(retract);
|
gttoc(retract);
|
||||||
|
|
||||||
// compute new error
|
// compute new error
|
||||||
|
|
Loading…
Reference in New Issue