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

Namespaces

namespace  classic
namespace  output
namespace  zero_dim_detail

Classes

struct  AnyAlgorithm
 Type-erased base for all nag algorithms, exposing a single Run() entry point. More...
struct  TolerancesConfig
 Newton and path-tracking tolerances. More...
struct  MidPathConfig
 Configuration for the midpath (path-crossing) check. More...
struct  AutoRetrackConfig
 Configuration for auto-retracking paths flagged as crossed. More...
struct  SharpeningConfig
 Configuration for sharpening computed solutions. More...
struct  RegenerationConfig
 Configuration for the regeneration cascade. More...
struct  PostProcessingConfig
 Configuration for post-processing solutions (reality/finiteness/singularity classification). More...
struct  RecordsConfig
 How a recording algorithm uses the records it finds: not what to compute, but what already-recorded work counts as done. More...
struct  ZeroDimConfig
 Top-level configuration for a zero-dimensional solve (times, precision, threading). More...
struct  MetaConfig
 Top-level meta configuration: which algorithm to run. More...
struct  RandomConfig
 The RNG seed a classic Bertini input file asks for, via randomseed: N;. More...
struct  AlgoTraits
class  PathStarted
 The algorithm is beginning work on one solution path, carrying its index. More...
class  PathComplete
 The algorithm has finished work on one solution path, carrying its index. More...
struct  MidpathChecker
 Detects whether any solution paths crossed during tracking, before the endgame. More...
struct  NewtonRefineResult
 The outcome of a standalone Newton refinement. More...
struct  NumericalIrreducibleDecomposition
 forward declare of the NumericalIrreducibleDecomposition algorithm. More...
struct  AlgoTraits< NumericalIrreducibleDecomposition< TrackerType, EndgameType, SystemType > >
 specify the traits for the algorithm. More...
struct  AnyNID
 Type-erased base for the Numerical Irreducible Decomposition algorithm. More...
struct  Sharpen
struct  HomotopySolver
 The continuation primitive: given a homotopy + a source of start points, track each path through the tracker and endgame, resolve crossings, classify the endpoints, and report. More...
struct  ZeroDimSolver
 The zero-dimensional solve algorithm: given a polynomial system, form a start system and a homotopy, then run the continuation engine. More...
struct  AlgoTraits< HomotopySolver< TrackerType, EndgameType, SystemType > >
 specify the traits for the algorithm. More...
struct  AnyZeroDim
 Type-erased base for a zero-dimensional solve, exposing output and config entry points. More...
 metadata structs More...
 Per-solution metadata gathered during and after a path track. More...
 State captured at the endgame boundary, handed off to start the endgame. More...
struct  MidpathCheckReport
 Summary of what the midpath (path-crossing) check found at the endgame boundary, and what the algorithm did about it. More...
struct  SolveReport
 A concise, human-readable summary of a zero-dimensional solve: how every path ended up, and – crucially – whether any path was lost. More...

Typedefs

template<typename T>
using SolnCont = std::vector<T>
using SolnIndT = typename SolnCont<complex_dbl>::size_type
 Index type for solutions/paths (over a double-precision solution container).

Enumerations

enum class  RecallPolicy { Nothing , Completed , Everything }
 Which recorded outcomes count as already answered when an identical ask is solved again. More...

Functions

template<typename ComplexT>
unsigned DefaultInitialAmbientPrecision ()
 The default ambient precision for a ZeroDimConfig, by complex type.
 ADD_BERTINI_EVENT_TYPE (AlgorithmEvent, ConstEvent)
 Generic event for a numerical algebraic geometry algorithm.
 ADD_BERTINI_EVENT_TYPE (AlgorithmStarted, AlgorithmEvent)
 The algorithm has begun (e.g.
 ADD_BERTINI_EVENT_TYPE (AlgorithmComplete, AlgorithmEvent)
 The algorithm has finished.
template<typename ComplexT>
NewtonRefineResult< ComplexT > NewtonRefine (System const &S, Vec< ComplexT > const &start, NumErrorT tolerance, unsigned max_iterations, ComplexT time=ComplexT(0))
 Newton-refine a point against a square System, without a tracker.
template<typename NumT>
std::ostream & operator<< (std::ostream &out, const SolutionMetaData< NumT > &meta)
 Stream insertion: write the metadata fields one per line (used by the Python bindings).
template<typename NumT>
std::ostream & operator<< (std::ostream &out, const EGBoundaryMetaData< NumT > &meta)
 Stream insertion: write the boundary metadata fields one per line (used by the Python bindings).
std::ostream & operator<< (std::ostream &out, const MidpathCheckReport &r)
 Stream insertion: write the midpath-check report fields one per line.
template<typename ComplexT>
SolveReport SummarizeSolve (std::vector< SolutionMetaData< ComplexT > > const &metadata, MidpathCheckReport const &midpath)
 Build a SolveReport from the per-endpoint final metadata and the midpath-crossing report.
std::ostream & operator<< (std::ostream &out, const SolveReport &r)
 Stream insertion: write a human-readable summary of the solve report.
template<typename Target, typename... Ts>
void InjectParsedTuple (Target &target, std::tuple< Ts... > const &t)
 Inject every element of a tuple of config structs into a Configured-derived target via Set<T>.

Typedef Documentation

◆ SolnCont

template<typename T>
using bertini::algorithm::SolnCont = std::vector<T>

◆ SolnIndT

using bertini::algorithm::SolnIndT = typename SolnCont<complex_dbl>::size_type

Index type for solutions/paths (over a double-precision solution container).

Enumeration Type Documentation

◆ RecallPolicy

Which recorded outcomes count as already answered when an identical ask is solved again.

The question recall answers is: a path for this same ask is on record – may its record be used in place of tracking it? A path record is reusable when the run that would reuse it asks no more of that path than the run that produced it. A completed path (success, divergence, a failure under settings that are part of the ask) always qualifies. An abandonment – a path somebody stopped, or a wall-clock limit cut off – was ended for a reason deliberately kept out of the ask, so whether to reuse it is the user's call, and this is where they make it. Transient, like num_threads: it says how to use the records, not what was computed, so it is not part of the configuration's identity.

Enumerator
Nothing 

Track every path fresh, even when recorded (observers, benchmarking, re-verification). The fresh run is still recorded.

Completed 

The default. Reuse completed paths; re-track abandoned ones – except one cut off by a wall-clock limit no smaller than the current per-path limit, which is reused since the run asks no more of it. An interrupted path is always re-tracked.

Everything 

Reuse every recorded outcome as recorded, abandonments included; nothing is re-tracked.

Function Documentation

◆ ADD_BERTINI_EVENT_TYPE() [1/3]

bertini::algorithm::ADD_BERTINI_EVENT_TYPE ( AlgorithmComplete ,
AlgorithmEvent  )

The algorithm has finished.

◆ ADD_BERTINI_EVENT_TYPE() [2/3]

bertini::algorithm::ADD_BERTINI_EVENT_TYPE ( AlgorithmEvent ,
ConstEvent  )

Generic event for a numerical algebraic geometry algorithm.

◆ ADD_BERTINI_EVENT_TYPE() [3/3]

bertini::algorithm::ADD_BERTINI_EVENT_TYPE ( AlgorithmStarted ,
AlgorithmEvent  )

The algorithm has begun (e.g.

the whole zero-dim solve is starting).

◆ DefaultInitialAmbientPrecision()

template<typename ComplexT>
unsigned bertini::algorithm::DefaultInitialAmbientPrecision ( )
inline

The default ambient precision for a ZeroDimConfig, by complex type.

Double-precision solves work at double; multiprecision solves work at the current default precision – which is the precision the MultiplePrecisionTracker is built at, so that in a fixed-multiple solve the start points, the tracker, and the working ("thread") precision are all one and the same value. (Defaulting to DoublePrecision() here left fixed-multiple solves with the tracker at DefaultPrecision() but the ambient/thread precision at double – a mismatch the tracker rejects at start.)

◆ InjectParsedTuple()

template<typename Target, typename... Ts>
void bertini::algorithm::InjectParsedTuple ( Target & target,
std::tuple< Ts... > const & t )

Inject every element of a tuple of config structs into a Configured-derived target via Set<T>.

Template Parameters
TargetThe Configured-derived target type.
TsThe config struct types in the tuple.
Parameters
targetThe target to set the configs on.
tThe tuple of config structs to inject.

◆ NewtonRefine()

template<typename ComplexT>
NewtonRefineResult< ComplexT > bertini::algorithm::NewtonRefine ( System const & S,
Vec< ComplexT > const & start,
NumErrorT tolerance,
unsigned max_iterations,
ComplexT time = ComplexT(0) )

Newton-refine a point against a square System, without a tracker.

Iterates full Newton steps until the infinity norm of the step falls at or below tolerance, or max_iterations steps have been taken. For a system with a path variable, evaluation is at time time; for an autonomous system time is ignored.

Template Parameters
ComplexTthe complex number type to iterate in.
Parameters
Sthe system to refine against. Must be square: NumTotalFunctions() (user functions plus patches) equal to NumVariables(). Deflated systems are the intended customers – square them by randomization if overdetermined.
startthe approximate solution to refine.
tolerancestop when the infinity norm of a Newton step is at or below this.
max_iterationsrefuse to iterate more than this many times.
timethe path-variable value for non-autonomous systems; ignored otherwise.
Returns
a NewtonRefineResult carrying the refined point, the achieved step norm, the iteration count, and the SuccessCode.
Exceptions
std::runtime_errorif the system is not square, with a message saying how to square it.

◆ operator<<() [1/4]

template<typename NumT>
std::ostream & bertini::algorithm::operator<< ( std::ostream & out,
const EGBoundaryMetaData< NumT > & meta )

Stream insertion: write the boundary metadata fields one per line (used by the Python bindings).

◆ operator<<() [2/4]

std::ostream & bertini::algorithm::operator<< ( std::ostream & out,
const MidpathCheckReport & r )
inline

Stream insertion: write the midpath-check report fields one per line.

◆ operator<<() [3/4]

template<typename NumT>
std::ostream & bertini::algorithm::operator<< ( std::ostream & out,
const SolutionMetaData< NumT > & meta )

Stream insertion: write the metadata fields one per line (used by the Python bindings).

◆ operator<<() [4/4]

std::ostream & bertini::algorithm::operator<< ( std::ostream & out,
const SolveReport & r )
inline

Stream insertion: write a human-readable summary of the solve report.

◆ SummarizeSolve()

template<typename ComplexT>
SolveReport bertini::algorithm::SummarizeSolve ( std::vector< SolutionMetaData< ComplexT > > const & metadata,
MidpathCheckReport const & midpath )

Build a SolveReport from the per-endpoint final metadata and the midpath-crossing report.

Pure aggregation – one pass, no solve state – so it is unit-testable on synthetic metadata.