10#include "unsupported/Eigen/Polynomials"
21class Poly2DFracResidual;
55 bool checkCoefficients(
const Eigen::MatrixXd& coefficients,
const unsigned int rows,
const unsigned int columns);
70 Eigen::MatrixXd
integrateCoeffs(
const Eigen::MatrixXd& coefficients,
const int& axis,
const int& times);
79 Eigen::MatrixXd
deriveCoeffs(
const Eigen::MatrixXd& coefficients,
const int& axis = -1,
const int& times = 1);
95 double evaluate(
const Eigen::MatrixXd& coefficients,
const double& x_in);
100 double evaluate(
const Eigen::MatrixXd& coefficients,
const double& x_in,
const double& y_in);
106 double derivative(
const Eigen::MatrixXd& coefficients,
const double& x_in,
const double& y_in,
const int& axis);
112 double integral(
const Eigen::MatrixXd& coefficients,
const double& x_in,
const double& y_in,
const int& axis);
134 Eigen::VectorXd
solve(
const Eigen::MatrixXd& coefficients,
const double& in,
const double& z_in,
const int& axis);
143 double solve_limits(
const Eigen::MatrixXd& coefficients,
const double& in,
const double& z_in,
const double& min,
const double& max,
152 double solve_guess(
const Eigen::MatrixXd& coefficients,
const double& in,
const double& z_in,
const double& guess,
const int& axis);
160 [[deprecated(
"Poor performance; use Horner-scheme instead")]]
double simplePolynomial(
const std::vector<std::vector<double>>& coefficients,
168 double baseHorner(
const std::vector<double>& coefficients,
double x);
169 [[deprecated(
"Deprecated since move to Eigen framework; use Eigen-based routines instead")]]
double
170 baseHorner(
const std::vector<std::vector<double>>& coefficients,
double x,
double y);
209 double call(
double target)
override;
210 double deriv(
double target)
override;
259 Eigen::MatrixXd
deriveCoeffs(
const Eigen::MatrixXd& coefficients,
const int& axis,
const int& times,
const int& firstExponent);
277 double evaluate(
const Eigen::MatrixXd& coefficients,
const double& x_in,
const int& firstExponent = 0,
const double& x_base = 0.0);
286 double evaluate(
const Eigen::MatrixXd& coefficients,
const double& x_in,
const double& y_in,
const int& x_exp,
const int& y_exp,
287 const double& x_base = 0.0,
const double& y_base = 0.0);
297 double derivative(
const Eigen::MatrixXd& coefficients,
const double& x_in,
const double& y_in,
const int& axis,
const int& x_exp,
298 const int& y_exp,
const double& x_base = 0.0,
const double& y_base = 0.0);
309 double integral(
const Eigen::MatrixXd& coefficients,
const double& x_in,
const double& y_in,
const int& axis,
const int& x_exp,
const int& y_exp,
310 const double& x_base = 0.0,
const double& y_base = 0.0,
const double& ax_val = 0.0);
322 Eigen::VectorXd
solve(
const Eigen::MatrixXd& coefficients,
const double& in,
const double& z_in,
const int& axis,
const int& x_exp,
323 const int& y_exp,
const double& x_base = 0.0,
const double& y_base = 0.0);
336 double solve_limits(
const Eigen::MatrixXd& coefficients,
const double& in,
const double& z_in,
const double& min,
const double& max,
337 const int& axis,
const int& x_exp,
const int& y_exp,
const double& x_base = 0.0,
const double& y_base = 0.0);
349 double solve_guess(
const Eigen::MatrixXd& coefficients,
const double& in,
const double& z_in,
const double& guess,
const int& axis,
350 const int& x_exp,
const int& y_exp,
const double& x_base = 0.0,
const double& y_base = 0.0);
364 double solve_limitsInt(
const Eigen::MatrixXd& coefficients,
const double& in,
const double& z_in,
const double& min,
const double& max,
365 const int& axis,
const int& x_exp,
const int& y_exp,
const double& x_base = 0.0,
const double& y_base = 0.0,
366 const int& int_axis = 0);
379 double solve_guessInt(
const Eigen::MatrixXd& coefficients,
const double& in,
const double& z_in,
const double& guess,
const int& axis,
380 const int& x_exp,
const int& y_exp,
const double& x_base = 0.0,
const double& y_base = 0.0,
const int& int_axis = 0);
388 double binom(
const int& nValue,
const int& nValue2);
400 double fracIntCentral(
const Eigen::MatrixXd& coefficients,
const double& x_in,
const double& x_base);
428 double call(
double target)
override;
429 double deriv(
double target)
override;
454 double call(
double target)
override;
455 double deriv(
double target)
override;