22#ifndef BERTINI_AMP_CRITERIA_HPP
23#define BERTINI_AMP_CRITERIA_HPP
66 template<
typename NumT>
106 return AMP_config.
safety_digits_1 +
D(norm_J, norm_J_inverse, AMP_config) + (-log10(tracking_tolerance) + log10(norm_of_latest_newton_residual)) / (num_newton_iterations_remaining);
127 template<
typename NumT>
129 double const& norm_J_inverse,
130 unsigned num_newton_iterations_remaining,
132 double const& norm_of_latest_newton_residual,
156 double const& norm_z,
177 template<
typename Derived>
179 const Eigen::MatrixBase<Derived>& z,
183 return CriterionCRHS(norm_J_inverse,
double(z.norm()), tracking_tolerance, AMP_config);
201 template<
typename NumT,
typename Derived>
Definition amp_criteria.hpp:36
bool CriterionB(double const &norm_J, double const &norm_J_inverse, unsigned num_newton_iterations_remaining, NumErrorT const &tracking_tolerance, double const &norm_of_latest_newton_residual, AdaptiveMultiplePrecisionConfig const &_config)
Check AMP Criterion B.
Definition amp_criteria.hpp:128
double D(double const &norm_J, double const &norm_J_inverse, AdaptiveMultiplePrecisionConfig const &_config)
Compute the expression from the AMP papers amp1, amp2, amp3.
Definition amp_criteria.hpp:84
double CriterionCRHS(double const &norm_J_inverse, double const &norm_z, NumErrorT const &tracking_tolerance, AdaptiveMultiplePrecisionConfig const &_config)
Evaluate the right hand side of Criterion C.
Definition amp_criteria.hpp:155
double CriterionBRHS(double const &norm_J, double const &norm_J_inverse, unsigned num_newton_iterations_remaining, NumErrorT const &tracking_tolerance, double const &norm_of_latest_newton_residual, AdaptiveMultiplePrecisionConfig const &_config)
Evaluate the right hand side of the inequality of Criterion B.
Definition amp_criteria.hpp:104
double CriterionARHS(double const &norm_J, double const &norm_J_inverse, AdaptiveMultiplePrecisionConfig const &_config)
The right hand side of Criterion A, from amp1, amp2.
Definition amp_criteria.hpp:46
bool CriterionA(double const &norm_J, double const &norm_J_inverse, AdaptiveMultiplePrecisionConfig const &_config)
Check AMP Criterion A.
Definition amp_criteria.hpp:67
bool CriterionC(double const &norm_J_inverse, const Eigen::MatrixBase< Derived > &z, NumErrorT tracking_tolerance, AdaptiveMultiplePrecisionConfig const &_config)
Check AMP Criterion C.
Definition amp_criteria.hpp:202
Definition adaptive_precision_utilities.hpp:35
Definition algorithm_builder.hpp:36
double NumErrorT
The numeric type used to hold error/tolerance magnitudes throughout Bertini2 – tracking tolerances,...
Definition num_traits.hpp:48
Numeric traits for a bertini number type: digit counts, conversions, and companion types.
Definition num_traits.hpp:57
Holds the program parameters with respect to Adaptive Multiple Precision.
Definition config.hpp:214
NumErrorT function_eval_error_bound
Bound on the error of evaluating the functions, divided by the unit roundoff error.
Definition config.hpp:240
int safety_digits_2
User-chosen setting for the number of safety digits used during Criterion C.
Definition config.hpp:243
int safety_digits_1
User-chosen setting for the number of safety digits used during Criteria A & B.
Definition config.hpp:242
NumErrorT jacobian_eval_error_bound
Bound on the error of evaluating the Jacobian, divided by the unit roundoff error .
Definition config.hpp:233
NumErrorT linear_solve_error_bound
Bound on the growth in error from a linear solve.
Definition config.hpp:222
Configs and settings for tracking.