Uses the Brent solver to find the roots of p(x_in,y_in)-z_in @param res Poly2DResidual object to calculate residuals and derivatives @param min double value that represents the minimum value @param max double value that represents the maximum value
| 188 | /// @param min double value that represents the minimum value |
| 189 | /// @param max double value that represents the maximum value |
| 190 | double Polynomial2D::solve_limits(Poly2DResidual* res, const double& min, const double& max) { |
| 191 | if (do_debug()) std::cout << format("Called solve_limits with: min=%f and max=%f", min, max) << '\n'; |
| 192 | double macheps = DBL_EPSILON; |
| 193 | double tol = DBL_EPSILON * 1e3; |
| 194 | int maxiter = 10; |
| 195 | double result = Brent(res, min, max, macheps, tol, maxiter); |
| 196 | if (this->do_debug()) std::cout << "Brent solver message: " << res->errstring << '\n'; |
| 197 | return result; |
| 198 | } |
| 199 | |
| 200 | /// Uses the Newton solver to find the roots of p(x_in,y_in)-z_in |
| 201 | /// @param res Poly2DResidual object to calculate residuals and derivatives |
no test coverage detected