| 44 | {} |
| 45 | |
| 46 | void FactorGraph::solve() |
| 47 | { |
| 48 | /** check if config is valid */ |
| 49 | std::string OptionsError; |
| 50 | if (_SolverOptions.IsValid(&OptionsError) == false) |
| 51 | { |
| 52 | PRINT_ERROR("The given solver options are wrong: ", OptionsError); |
| 53 | } |
| 54 | else |
| 55 | { |
| 56 | /** call ceres to solve the optimization problem */ |
| 57 | ceres::Solve(_SolverOptions, &_Graph, &_Report); |
| 58 | _SolverDuration += _Report.total_time_in_seconds; |
| 59 | _SolverIterations += _Report.num_successful_steps + _Report.num_unsuccessful_steps; |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void FactorGraph::solve(ceres::Solver::Options Options) |
| 64 | { |
no outgoing calls