Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
bertini::tracking::AdaptiveMultiplePrecisionConfig Struct Reference

Holds the program parameters with respect to Adaptive Multiple Precision. More...

#include <config.hpp>

Public Member Functions

void SetBoundsFrom (System const &sys)
 Set the linear-solve error bound, the degree bound and the coefficient bound from a system.
void SetErrorBoundsFromDegreeAndCoefficient ()
 Set the two evaluation error bounds from the degree and coefficient bounds.
void SetAMPConfigFrom (System const &sys)
 Set every system-derived AMP setting from a system: the degree, coefficient and linear-solve bounds, and the two evaluation error bounds derived from them.
 AdaptiveMultiplePrecisionConfig ()
 Construct with default AMP bounds and safety digits.
 AdaptiveMultiplePrecisionConfig (System const &sys)
 Construct AMP settings derived from a system's bounds, where that is possible.

Public Attributes

NumErrorT coefficient_bound
 User-defined bound on the sum of the abs vals of the coeffs for any polynomial in the system (for adaptive precision).
NumErrorT degree_bound
 User-set bound on degrees of polynomials in the system - tricky to compute for factored polys, subfuncs, etc. (for adaptive precision).
NumErrorT linear_solve_error_bound
 Bound on the growth in error from a linear solve.
NumErrorT jacobian_eval_error_bound
 Bound on the error of evaluating the Jacobian, divided by the unit roundoff error $10^{-P}$.
NumErrorT function_eval_error_bound
 Bound on the error of evaluating the functions, divided by the unit roundoff error.
int safety_digits_1 = 1
 User-chosen setting for the number of safety digits used during Criteria A & B.
int safety_digits_2 = 1
 User-chosen setting for the number of safety digits used during Criterion C.
unsigned int maximum_precision = 300
 User-chosed setting for the maximum allowable precision. Paths will die if their precision is requested to be set higher than this threshold.
unsigned max_num_precision_decreases = 10
 The maximum number of times precision can be lowered during tracking of a segment of path.

Detailed Description

Holds the program parameters with respect to Adaptive Multiple Precision.

These criteria are developed in [1], [2].

Let: $J$ be the Jacobian matrix of the square system being solved. $d$ is the latest Newton residual. $N$ is the maximum number of Newton iterations to perform.

Criterion A: $ P > \sigma_1 + \log_{10} [ ||J^{-1}|| \epsilon (||J|| + \Phi)   ]  $

Criterion B: $ P > \sigma_1 + D + (\tau + \log_{10} ||d||) / (N-i)  $ where $ D = \log_{10} [||J^{-1}||((2 + \epsilon)||J|| + \epsilon \Phi) | 1] $

Criterion C: $ P > \sigma_2 + \tau + \log_{10}(||J^{-1}|| \Psi + ||z||)  $

Constructor & Destructor Documentation

◆ AdaptiveMultiplePrecisionConfig() [1/2]

bertini::tracking::AdaptiveMultiplePrecisionConfig::AdaptiveMultiplePrecisionConfig ( )
inline

Construct with default AMP bounds and safety digits.

The three error bounds are normally recomputed from the system before tracking (

See also
SetAMPConfigFrom). They are nonetheless initialized here so that a default-constructed config is fully deterministic: the linear-solve bound takes the single-variable value ( $1^2$), and the two evaluation bounds are derived from the default degree and coefficient bounds so the object is internally consistent. Leaving them uninitialized produced garbage (e.g. NaN) that broke value comparison and pickle round-tripping.

◆ AdaptiveMultiplePrecisionConfig() [2/2]

bertini::tracking::AdaptiveMultiplePrecisionConfig::AdaptiveMultiplePrecisionConfig ( System const & sys)
inlineexplicit

Construct AMP settings derived from a system's bounds, where that is possible.

A system that is not polynomial has no degree bound, so there is nothing to derive from and the defaults are kept. This constructor is what a solver's automatic setup calls, and it must not refuse, or an analytic homotopy could not be handed a configuration the caller chose: the refusal would fire first, during construction. The defaults are internally consistent and are NOT a claim about such a system, so

See also
SetAMPConfigFrom, which a deliberate caller uses, does refuse. A caller who wants adaptive precision here supplies the two evaluation error bounds themselves.

Member Function Documentation

◆ SetAMPConfigFrom()

void bertini::tracking::AdaptiveMultiplePrecisionConfig::SetAMPConfigFrom ( System const & sys)
inline

Set every system-derived AMP setting from a system: the degree, coefficient and linear-solve bounds, and the two evaluation error bounds derived from them.

◆ SetBoundsFrom()

void bertini::tracking::AdaptiveMultiplePrecisionConfig::SetBoundsFrom ( System const & sys)
inline

Set the linear-solve error bound, the degree bound and the coefficient bound from a system.

The linear-solve error bound is the square of the number of variables. Bound on degree is set from a call to System class. Let this be $D$

See also
System::DegreeBound(). Bound on absolute values of coeffs is set from a call to System class. Let this be $B$.
System::CoefficientBound().

◆ SetErrorBoundsFromDegreeAndCoefficient()

void bertini::tracking::AdaptiveMultiplePrecisionConfig::SetErrorBoundsFromDegreeAndCoefficient ( )
inline

Set the two evaluation error bounds from the degree and coefficient bounds.

The polynomial recipe from [AMP1:] with $D$ the degree bound and $B$ the coefficient bound, the Jacobian evaluation error is bounded by $D(D-1)B$ and the function evaluation error by $DB$. It applies only to polynomial systems, which is the only kind that has a $D$; a caller with an analytic system sets the two bounds directly instead.

Member Data Documentation

◆ coefficient_bound

NumErrorT bertini::tracking::AdaptiveMultiplePrecisionConfig::coefficient_bound

User-defined bound on the sum of the abs vals of the coeffs for any polynomial in the system (for adaptive precision).

◆ degree_bound

NumErrorT bertini::tracking::AdaptiveMultiplePrecisionConfig::degree_bound

User-set bound on degrees of polynomials in the system - tricky to compute for factored polys, subfuncs, etc. (for adaptive precision).

◆ function_eval_error_bound

NumErrorT bertini::tracking::AdaptiveMultiplePrecisionConfig::function_eval_error_bound

Bound on the error of evaluating the functions, divided by the unit roundoff error.

Used for AMP criterion C, where it is called $\Psi$ in [1] and [2].

For a polynomial system this is $DB$; see the note above.

◆ jacobian_eval_error_bound

NumErrorT bertini::tracking::AdaptiveMultiplePrecisionConfig::jacobian_eval_error_bound

Bound on the error of evaluating the Jacobian, divided by the unit roundoff error $10^{-P}$.

Used for AMP criteria A and B, where it is called $\Phi$ in [1] and [2].

For a polynomial system this is $D(D-1)B$ in the degree and coefficient bounds below; that recipe is what SetErrorBoundsFromDegreeAndCoefficient applies. The quantity itself is more general than the recipe, which is why it is spelled out rather than named after a Greek letter: a caller with a system that has no degree can set this directly.

◆ linear_solve_error_bound

NumErrorT bertini::tracking::AdaptiveMultiplePrecisionConfig::linear_solve_error_bound

Bound on the growth in error from a linear solve.

Used for AMP criteria A and B, where it is called $\epsilon$ in [1] and [2]; see the top of page 13 of the former. A pessimistic bound is $2^n$; we use $n^2$ in the number of variables.

◆ max_num_precision_decreases

unsigned bertini::tracking::AdaptiveMultiplePrecisionConfig::max_num_precision_decreases = 10

The maximum number of times precision can be lowered during tracking of a segment of path.

◆ maximum_precision

unsigned int bertini::tracking::AdaptiveMultiplePrecisionConfig::maximum_precision = 300

User-chosed setting for the maximum allowable precision. Paths will die if their precision is requested to be set higher than this threshold.

◆ safety_digits_1

int bertini::tracking::AdaptiveMultiplePrecisionConfig::safety_digits_1 = 1

User-chosen setting for the number of safety digits used during Criteria A & B.

◆ safety_digits_2

int bertini::tracking::AdaptiveMultiplePrecisionConfig::safety_digits_2 = 1

User-chosen setting for the number of safety digits used during Criterion C.