31 #ifndef CERES_EXAMPLES_POSE_GRAPH_2D_ANGLE_MANIFOLD_H_
32 #define CERES_EXAMPLES_POSE_GRAPH_2D_ANGLE_MANIFOLD_H_
34 #if CERES_VERSION_MAJOR >= 3 || \
35 (CERES_VERSION_MAJOR == 2 && CERES_VERSION_MINOR >= 1)
36 #include <ceres/autodiff_manifold.h>
37 #include <ceres/manifold.h>
39 #include <ceres/local_parameterization.h>
49 #if CERES_VERSION_MAJOR >= 3 || \
50 (CERES_VERSION_MAJOR == 2 && CERES_VERSION_MINOR >= 1)
56 bool Plus(
const T* x_radians,
57 const T* delta_radians,
58 T* x_plus_delta_radians)
const {
59 *x_plus_delta_radians =
NormalizeAngle(*x_radians + *delta_radians);
64 bool Minus(
const T* y_radians,
66 T* y_minus_x_radians)
const {
73 static ceres::Manifold* Create() {
74 return new ceres::AutoDiffManifold<AngleManifold, 1, 1>;
84 bool operator()(
const T* theta_radians,
const T* delta_theta_radians,
85 T* theta_radians_plus_delta)
const {
86 *theta_radians_plus_delta =
92 static ceres::LocalParameterization*
Create() {
93 return (
new ceres::AutoDiffLocalParameterization<AngleManfold, 1, 1>);
102 #endif // CERES_EXAMPLES_POSE_GRAPH_2D_ANGLE_MANIFOLD_H_