diff options
Diffstat (limited to 'extern/ceres/internal/ceres/polynomial.h')
-rw-r--r-- | extern/ceres/internal/ceres/polynomial.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/extern/ceres/internal/ceres/polynomial.h b/extern/ceres/internal/ceres/polynomial.h index 3e09bae3d0f..20071f2c693 100644 --- a/extern/ceres/internal/ceres/polynomial.h +++ b/extern/ceres/internal/ceres/polynomial.h @@ -33,6 +33,7 @@ #define CERES_INTERNAL_POLYNOMIAL_SOLVER_H_ #include <vector> + #include "ceres/internal/eigen.h" #include "ceres/internal/port.h" @@ -65,13 +66,13 @@ inline double EvaluatePolynomial(const Vector& polynomial, double x) { // On failure, a more detailed message will be written to LOG(ERROR). // If real is not NULL, the real parts of the roots will be returned in it. // Likewise, if imaginary is not NULL, imaginary parts will be returned in it. -bool FindPolynomialRoots(const Vector& polynomial, - Vector* real, - Vector* imaginary); +CERES_EXPORT_INTERNAL bool FindPolynomialRoots(const Vector& polynomial, + Vector* real, + Vector* imaginary); // Return the derivative of the given polynomial. It is assumed that // the input polynomial is at least of degree zero. -Vector DifferentiatePolynomial(const Vector& polynomial); +CERES_EXPORT_INTERNAL Vector DifferentiatePolynomial(const Vector& polynomial); // Find the minimum value of the polynomial in the interval [x_min, // x_max]. The minimum is obtained by computing all the roots of the @@ -79,11 +80,11 @@ Vector DifferentiatePolynomial(const Vector& polynomial); // interval [x_min, x_max] are considered as well as the end points // x_min and x_max. Since polynomials are differentiable functions, // this ensures that the true minimum is found. -void MinimizePolynomial(const Vector& polynomial, - double x_min, - double x_max, - double* optimal_x, - double* optimal_value); +CERES_EXPORT_INTERNAL void MinimizePolynomial(const Vector& polynomial, + double x_min, + double x_max, + double* optimal_x, + double* optimal_value); // Given a set of function value and/or gradient samples, find a // polynomial whose value and gradients are exactly equal to the ones @@ -96,7 +97,8 @@ void MinimizePolynomial(const Vector& polynomial, // Of course its possible to sample a polynomial any number of times, // in which case, generally speaking the spurious higher order // coefficients will be zero. -Vector FindInterpolatingPolynomial(const std::vector<FunctionSample>& samples); +CERES_EXPORT_INTERNAL Vector +FindInterpolatingPolynomial(const std::vector<FunctionSample>& samples); // Interpolate the function described by samples with a polynomial, // and minimize it on the interval [x_min, x_max]. Depending on the @@ -104,11 +106,12 @@ Vector FindInterpolatingPolynomial(const std::vector<FunctionSample>& samples); // finding algorithms may fail due to numerical difficulties. But the // function is guaranteed to return its best guess of an answer, by // considering the samples and the end points as possible solutions. -void MinimizeInterpolatingPolynomial(const std::vector<FunctionSample>& samples, - double x_min, - double x_max, - double* optimal_x, - double* optimal_value); +CERES_EXPORT_INTERNAL void MinimizeInterpolatingPolynomial( + const std::vector<FunctionSample>& samples, + double x_min, + double x_max, + double* optimal_x, + double* optimal_value); } // namespace internal } // namespace ceres |