Linearize can now be overwritten
parent
194cae51ef
commit
cfe9b9c52c
|
@ -68,13 +68,18 @@ void LevenbergMarquardtParams::print(const std::string& str) const {
|
||||||
std::cout.flush();
|
std::cout.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
GaussianFactorGraph::shared_ptr LevenbergMarquardtOptimizer::linearize() const {
|
||||||
|
return graph_.linearize(state_.values);
|
||||||
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void LevenbergMarquardtOptimizer::iterate() {
|
void LevenbergMarquardtOptimizer::iterate() {
|
||||||
|
|
||||||
gttic(LM_iterate);
|
gttic(LM_iterate);
|
||||||
|
|
||||||
// Linearize graph
|
// Linearize graph
|
||||||
GaussianFactorGraph::shared_ptr linear = graph_.linearize(state_.values);
|
GaussianFactorGraph::shared_ptr linear = linearize();
|
||||||
|
|
||||||
// Pull out parameters we'll use
|
// Pull out parameters we'll use
|
||||||
const NonlinearOptimizerParams::Verbosity nloVerbosity = params_.verbosity;
|
const NonlinearOptimizerParams::Verbosity nloVerbosity = params_.verbosity;
|
||||||
|
|
|
@ -177,6 +177,9 @@ protected:
|
||||||
|
|
||||||
/** Internal function for computing a COLAMD ordering if no ordering is specified */
|
/** Internal function for computing a COLAMD ordering if no ordering is specified */
|
||||||
LevenbergMarquardtParams ensureHasOrdering(LevenbergMarquardtParams params, const NonlinearFactorGraph& graph) const;
|
LevenbergMarquardtParams ensureHasOrdering(LevenbergMarquardtParams params, const NonlinearFactorGraph& graph) const;
|
||||||
|
|
||||||
|
/** linearize, can be overwritten */
|
||||||
|
virtual GaussianFactorGraph::shared_ptr linearize() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue