mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 17:10:38 +08:00
fix formatting for examples
This is mostly just applying the existing clang format config, except: - Use NOLINT on overlong comment lines. - Wrap some sections in 'clang-format off' / 'clang format on'. - Manually split or join some multi-line strings. Change-Id: Ia1a40eeb92112e12c3a169309afe087af55b2f4f
This commit is contained in:
@@ -33,20 +33,21 @@
|
||||
// Minimize 0.5 (10 - x)^2 using analytic jacobian matrix.
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "ceres/ceres.h"
|
||||
#include "glog/logging.h"
|
||||
|
||||
using ceres::CostFunction;
|
||||
using ceres::SizedCostFunction;
|
||||
using ceres::Problem;
|
||||
using ceres::Solver;
|
||||
using ceres::SizedCostFunction;
|
||||
using ceres::Solve;
|
||||
using ceres::Solver;
|
||||
|
||||
// A CostFunction implementing analytically derivatives for the
|
||||
// function f(x) = 10 - x.
|
||||
class QuadraticCostFunction
|
||||
: public SizedCostFunction<1 /* number of residuals */,
|
||||
1 /* size of first parameter */> {
|
||||
: public SizedCostFunction<1 /* number of residuals */,
|
||||
1 /* size of first parameter */> {
|
||||
public:
|
||||
virtual ~QuadraticCostFunction() {}
|
||||
|
||||
@@ -100,8 +101,7 @@ int main(int argc, char** argv) {
|
||||
Solve(options, &problem, &summary);
|
||||
|
||||
std::cout << summary.BriefReport() << "\n";
|
||||
std::cout << "x : " << initial_x
|
||||
<< " -> " << x << "\n";
|
||||
std::cout << "x : " << initial_x << " -> " << x << "\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user