Bertini 2 - C++ Core
Software for Numerical Algebraic Geometry
Loading...
Searching...
No Matches
adaptive_precision_utilities.hpp File Reference

Functions for dealing with precisions of objects, particularly in the context of adaptive precision. More...

Include dependency graph for adaptive_precision_utilities.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

unsigned bertini::tracking::adaptive::EnsureAtUniformPrecision (TimeCont< dbl > &times, SampCont< dbl > &samples)
 Does not a thing, because cannot.
 
unsigned bertini::tracking::adaptive::EnsureAtUniformPrecision (TimeCont< mpfr_complex > &times, SampCont< mpfr_complex > &samples)
 Changes precision of mpfr_complex to highest needed precision for the samples.
 
unsigned bertini::tracking::adaptive::EnsureAtUniformPrecision (TimeCont< mpfr_complex > &times, SampCont< mpfr_complex > &samples, SampCont< mpfr_complex > &derivatives)
 Changes precision of mpfr_complex to highest needed precision for the samples.
 
unsigned bertini::tracking::adaptive::MaxPrecision (SampCont< mpfr_complex > const &samples)
 Get the maximum precision among an input set of space samples.
 
unsigned bertini::tracking::adaptive::MaxPrecision (TimeCont< mpfr_complex > const &times)
 Gets the maximum precision among a set of times.
 
void bertini::tracking::adaptive::SetPrecision (SampCont< mpfr_complex > &samples, unsigned prec)
 Sets the precision of each space sample to be of input precision.
 
void bertini::tracking::adaptive::SetPrecision (TimeCont< mpfr_complex > &times, unsigned prec)
 Sets the precision of each time sample to be of input precision.
 

Detailed Description

Functions for dealing with precisions of objects, particularly in the context of adaptive precision.

These definitions are provided for use in trackers and endgames. This allows a uniform interface regardless of tracker details.

Function Documentation

◆ EnsureAtUniformPrecision() [1/3]

unsigned bertini::tracking::adaptive::EnsureAtUniformPrecision ( TimeCont< dbl > & times,
SampCont< dbl > & samples )
inline

Does not a thing, because cannot.

Cannot change precision of fixed precision hardware doubles. This function is provided for template lookup, and interface completeness.

Parameters
timesSome times \(\in \mathbb{C}\).
samplesSome space samples \(\in \mathbb{C}^n\).
Returns
The precision, which is now uniform.

◆ EnsureAtUniformPrecision() [2/3]

unsigned bertini::tracking::adaptive::EnsureAtUniformPrecision ( TimeCont< mpfr_complex > & times,
SampCont< mpfr_complex > & samples )
inline

Changes precision of mpfr_complex to highest needed precision for the samples.

Parameters
timesSome times \(\in \mathbb{C}\).
samplesSome space samples \(\in \mathbb{C}^n\).
Returns
The precision, which is now uniform.

◆ EnsureAtUniformPrecision() [3/3]

unsigned bertini::tracking::adaptive::EnsureAtUniformPrecision ( TimeCont< mpfr_complex > & times,
SampCont< mpfr_complex > & samples,
SampCont< mpfr_complex > & derivatives )
inline

Changes precision of mpfr_complex to highest needed precision for the samples.

This function does NOT do any refinement, it merely changes the precision of default, and of the input objects.

Parameters
timesThe times of some space samples
samplesSome spatial samples, probably obtained from an Endgame
derivativesThe derivatives of the space samples, at the time samples. Again, probably obtained from Endgame.
Returns
The precision changed to.

◆ MaxPrecision() [1/2]

unsigned bertini::tracking::adaptive::MaxPrecision ( SampCont< mpfr_complex > const & samples)
inline

Get the maximum precision among an input set of space samples.

This is computed based on the first coordinate. Length-zero samples will cause either an assert or a throw (from Eigen, not Bertini2).

Parameters
samplesSome complex samples in space, obtained from tracking probably.
Returns
The maximum precision among those samples.

◆ MaxPrecision() [2/2]

unsigned bertini::tracking::adaptive::MaxPrecision ( TimeCont< mpfr_complex > const & times)
inline

Gets the maximum precision among a set of times.

Parameters
timesSome complex times.
Returns
The maximum precision among those times.

◆ SetPrecision() [1/2]

void bertini::tracking::adaptive::SetPrecision ( SampCont< mpfr_complex > & samples,
unsigned prec )
inline

Sets the precision of each space sample to be of input precision.

Parameters
samplesThe samples of which to change precision.
precThe new precision the samples should have.

◆ SetPrecision() [2/2]

void bertini::tracking::adaptive::SetPrecision ( TimeCont< mpfr_complex > & times,
unsigned prec )
inline

Sets the precision of each time sample to be of input precision.

Parameters
timesThe times of which to change precision.
precThe new precision the times should have.