mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Deprecate LocalParameterizations
Add [[deprecate]] notices to everything LocalParameterization related. Make sure that Ceres can be compiled without triggering deprecation warnings. Update the documentation: a. Add deprecation notices. b. Document interaction between LocalParameterization and Manifold coexisting in the Problem. c. Add documentation for Manifold(s) Change-Id: Ie4ad48963c83fded86e533c8c60561af402fbaff
This commit is contained in:
@@ -105,8 +105,11 @@ class CERES_EXPORT GradientProblem {
|
||||
// NOTE: This constructor is deprecated and will be removed in the next public
|
||||
// release of Ceres Solver. Please move to using the Manifold based
|
||||
// constructor.
|
||||
GradientProblem(FirstOrderFunction* function,
|
||||
LocalParameterization* parameterization);
|
||||
[[deprecated(
|
||||
"LocalParameterizations are deprecated. Please use the constructor that "
|
||||
"uses Manifold instead.")]] GradientProblem(FirstOrderFunction* function,
|
||||
LocalParameterization*
|
||||
parameterization);
|
||||
|
||||
// Takes ownership of the function and the manifold.
|
||||
GradientProblem(FirstOrderFunction* function, Manifold* manifold);
|
||||
@@ -151,7 +154,8 @@ class CERES_EXPORT GradientProblem {
|
||||
//
|
||||
// NOTE: This method is deprecated and will be removed in the next public
|
||||
// release of Ceres Solver.
|
||||
const LocalParameterization* parameterization() const {
|
||||
[[deprecated("Use Manifolds instead.")]] const LocalParameterization*
|
||||
parameterization() const {
|
||||
return parameterization_.get();
|
||||
}
|
||||
|
||||
@@ -160,13 +164,14 @@ class CERES_EXPORT GradientProblem {
|
||||
//
|
||||
// NOTE: This method is deprecated and will be removed in the next public
|
||||
// release of Ceres Solver.
|
||||
LocalParameterization* mutable_parameterization() {
|
||||
[[deprecated("Use Manifolds instead.")]] LocalParameterization*
|
||||
mutable_parameterization() {
|
||||
return parameterization_.get();
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<FirstOrderFunction> function_;
|
||||
std::unique_ptr<LocalParameterization> parameterization_;
|
||||
[[deprecated]] std::unique_ptr<LocalParameterization> parameterization_;
|
||||
std::unique_ptr<Manifold> manifold_;
|
||||
std::unique_ptr<double[]> scratch_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user