44 std::unique_ptr<Solver> solver)
46 m_solver{
std::move(solver)} {}
51 int iteration,
bool online) {
53 "underlying linear solver operates on different graph");
70 return OptimizationAlgorithm::Fail;
OptimizationAlgorithmGaussNewton(std::unique_ptr< Solver > solver)
virtual SolverResult solve(int iteration, bool online=false)
virtual ~OptimizationAlgorithmGaussNewton()
virtual void printVerbose(std::ostream &os) const
Base for solvers operating on the approximated Hessian, e.g., Gauss-Newton, Levenberg.
SparseOptimizer * _optimizer
the optimizer the solver is working on
virtual bool buildStructure(bool zeroBlocks=false)=0
double * x()
return x, the solution vector
virtual bool buildSystem()=0
virtual bool schur()=0
should the solver perform the schur complement or not
SparseOptimizer * optimizer() const
the optimizer (graph) on which the solver works
void computeActiveErrors()
void update(const double *update)
#define __PRETTY_FUNCTION__
double get_monotonic_time()
statistics about the optimization
double timeLinearSolution
double timeResiduals
residuals
static G2OBatchStatistics * globalStats()
double timeUpdate
time to apply the update
double timeQuadraticForm
construct the quadratic form in the graph
utility functions for handling time related stuff