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:
Nikolaus Demmel
2020-09-08 17:51:32 +02:00
parent 82275d8a4e
commit 7b6b2491cc
35 changed files with 743 additions and 717 deletions
@@ -35,23 +35,23 @@
#include "ceres/cubic_interpolation.h"
#include "glog/logging.h"
using ceres::Grid1D;
using ceres::CubicInterpolator;
using ceres::AutoDiffCostFunction;
using ceres::CostFunction;
using ceres::CubicInterpolator;
using ceres::Grid1D;
using ceres::Problem;
using ceres::Solver;
using ceres::Solve;
using ceres::Solver;
// A simple cost functor that interfaces an interpolated table of
// values with automatic differentiation.
struct InterpolatedCostFunctor {
explicit InterpolatedCostFunctor(
const CubicInterpolator<Grid1D<double> >& interpolator)
: interpolator_(interpolator) {
}
: interpolator_(interpolator) {}
template<typename T> bool operator()(const T* x, T* residuals) const {
template <typename T>
bool operator()(const T* x, T* residuals) const {
interpolator_.Evaluate(*x, residuals);
return true;
}