|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
class used to finish tracking paths during Homotopy Continuation More...
#include <powerseries.hpp>
Public Types | |
| using | BaseEGT = EndgameBase<PowerSeriesEndgame<PrecT>, PrecT> |
| The base endgame type. | |
| using | FinalEGT = PowerSeriesEndgame<PrecT> |
| The final (derived) endgame type. | |
| using | TrackerType = typename BaseEGT::TrackerType |
| The path-tracker type. | |
| using | BaseComplexT = typename BaseEGT::BaseComplexT |
| The complex number type. | |
| using | BaseRealT = typename BaseEGT::BaseRealT |
| The real number type. | |
| using | EmitterType = PowerSeriesEndgame<PrecT> |
| The event-emitter type. | |
| using | Config |
| The configuration bundle this endgame reads, public so that generic machinery which works in terms of an object's configs – the Python bindings' ConfiguredVisitor, which needs Config::UsedConfigs – can serve an endgame the same way it serves a tracker or a solver. | |
| using | UsedConfigs |
| The list of configuration types this object holds. | |
Public Member Functions | |
| auto | UpperBoundOnCycleNumber () const |
| template<typename ComplexT> | |
| void | ClearTimesAndSamples () |
| Function that clears all samples and times from data members for the Power Series endgame. | |
| template<typename ComplexT> | |
| void | SetTimes (TimeCont< ComplexT > const ×_to_set) |
| Function to set the times used for the Power Series endgame. | |
| template<typename ComplexT> | |
| const auto & | GetTimes () const |
| Function to get the times used for the Power Series endgame. | |
| const BCT & | LatestTimeImpl () const |
| template<typename ComplexT> | |
| void | SetSamples (SampCont< ComplexT > const &samples_to_set) |
| Function to set the space values used for the Power Series endgame. | |
| template<typename ComplexT> | |
| const auto & | GetSamples () const |
| Function to get the space values used for the Power Series endgame. | |
| template<typename ComplexT> | |
| void | SetRandVec (int size) |
| Function to set the times used for the Power Series endgame. | |
| PowerSeriesEndgame (TrackerType const &tr, const ConfigsAsTuple &settings) | |
| Construct the power-series endgame for a tracker, with its configuration as a tuple. | |
| template<typename... Ts> | |
| PowerSeriesEndgame (TrackerType const &tr, const Ts &... ts) | |
| Construct the power-series endgame for a tracker, with configs given in any order. | |
| template<typename ComplexT> | |
| unsigned | ComputeBoundOnCycleNumber () |
| Computes an upper bound on the cycle number. | |
| template<typename ComplexT> | |
| unsigned | ComputeCycleNumber (ComplexT const &t0) |
| This function computes the cycle number using an exhaustive search up the upper bound computed by the above function BoundOnCyleNumber. | |
| template<typename ComplexT> | |
| void | ComputeAllDerivatives () |
| Compute a set of derivatives using internal data to the endgame. | |
| template<typename ComplexT> | |
| std::tuple< TimeCont< ComplexT >, SampCont< ComplexT > > | TransformToSPlane (int cycle_num, ComplexT const &t0, unsigned num_pts, ContStart shift_from) |
| Transform the stored times and derivatives into the S-plane, scaled by the cycle number. | |
| template<typename ComplexT> | |
| SuccessCode | ComputeApproximationOfXAtT0 (Vec< ComplexT > &result, const ComplexT &t0) |
| This function computes an approximation of the space value at the time time_t0. | |
| template<typename ComplexT> | |
| SuccessCode | AdvanceTime (const ComplexT &target_time) |
| The samples used in the power series endgame are collected by advancing time to t = 0, by multiplying the current time by the sample factor. | |
| template<typename ComplexT> | |
| void | NoteWhetherInOperatingZone (SampCont< ComplexT > const &samples) const |
| Watch the c/k estimates settle, and say so once when they have. | |
| template<typename ComplexT> | |
| SuccessCode | RunImpl (const ComplexT &start_time, const Vec< ComplexT > &start_point, ComplexT const &target_time) |
| Primary function running the Power Series endgame. | |
| template<typename Dummy = void> | |
| SuccessCode | RunImplAMP (BCT const &start_time, Vec< BCT > const &start_point, BCT const &target_time) |
| Run the power-series endgame via the double-first adaptive-numeric-type driver, migrating up to mpfr only on tracker escalation. | |
| template<typename ComplexT> | |
| SuccessCode | SetupSegmentT (ComplexT const &start_time, Vec< ComplexT > const &start_point, ComplexT const &target_time) |
| Run the pre-loop setup and first extrapolation in a given numeric type, reporting escalation up to the driver. | |
| template<typename Dummy = void> | |
| SuccessCode | AdvanceTimeAMP (BCT const &target_time) |
| Advance time at the active numeric type, migrating-and-retrying in mpfr on escalation. | |
| template<typename Dummy = void> | |
| SuccessCode | RefineAllSamplesAMP () |
| Refine all retained samples at the active numeric type, migrating-and-retrying in mpfr on escalation. | |
| template<typename Dummy = void> | |
| void | ComputeAllDerivativesAMP () |
| Compute all sample derivatives at the active numeric type. | |
| template<typename Dummy = void> | |
| SuccessCode | ComputeApproxAMP (BCT const &target_time) |
| Compute the power-series extrapolation at the active numeric type, writing into final_approximation_ (BCT). | |
| template<typename Dummy = void> | |
| void | MigrateContainersToPrecision (unsigned newprec) |
| Widen this flavor's PowerSeries containers from the complex_dbl slot up to complex_mp at the new precision. | |
| virtual | ~PowerSeriesEndgame ()=default |
| auto | ComputeCOverK (SampCont< ComplexT > const &samples) const -> typename Eigen::NumTraits< ComplexT >::Real |
| An estimate of c/k from the three most recent geometric samples. | |
| bool | CheckForCOverKStabilization (std::deque< T > const &c_over_k_array) const |
| Have the last few c/k estimates settled to within the user's threshold? | |
| void | SetBoundaryTime (BCT const &t) |
| Set the endgame boundary (start) time. | |
| void | SetTargetTime (BCT const &t) |
| Set the final target time. | |
| BCT const & | BoundaryTime () const |
| BCT const & | TargetTime () const |
| SuccessCode | Run (Vec< BCT > const &start_point) |
| Run the endgame from the stored boundary time to the stored target time. | |
| void | EmitComputedSample (Vec< ComplexT > const &sample, ComplexT const &time) |
| Announce a completed sample point on the path, as a ComputedSamplePoint. | |
| SuccessCode | RefineAllSamples (SampCont< ComplexT > &samples, TimeCont< ComplexT > ×) |
| Refine every sample point to the endgame's refinement tolerance. | |
| SuccessCode | RefineSample (Vec< ComplexT > &result, Vec< ComplexT > const ¤t_sample, ComplexT const ¤t_time, NumErrorT tol, unsigned max_iterations) const |
| A function passed off to the precision-specific endgame part. | |
| SuccessCode | EndgameTrackPath (Vec< ComplexT > &result, ComplexT const &start_time, ComplexT const &end_time, Vec< ComplexT > const &start_point) const |
| Track through the tracker, adapting at the numeric-type boundary. | |
| SuccessCode | EscalateAndMigrate (unsigned guard) |
| Raise the endgame to the next precision and migrate the containers' complex_dbl slot up to complex_mp when the tracker's authority escalates. | |
| const auto & | EndgameSettings () const |
| This function is inferior to the templated Get<ConfigT> function provided. | |
| const auto & | SecuritySettings () const |
| bool | BeyondSecurityMaxNorm (RealT const &norm) const |
| unsigned | CycleNumber () const |
| void | CycleNumber (unsigned c) |
| Set the cycle number. | |
| void | IncrementCycleNumber (unsigned inc) |
| Increase the cycle number by the given increment. | |
| const auto & | FinalTolerance () const |
| Get the final tolerance to which we are tracking the solution. | |
| void | SetFinalTolerance (NumErrorT const &ft) |
| Setter for the final tolerance. | |
| const Vec< ComplexT > & | FinalApproximation () const |
| Get the most-recent approximation. | |
| const Vec< ComplexT > & | PreviousApproximation () const |
| Get the second-most-recent approximation. | |
| NumErrorT | ApproximateError () const |
| Get the most recent accuracy estimate. | |
| const BCT & | LatestTime () const |
| Get the latest time at which a point on the path was computed. | |
| SuccessCode | ComputeInitialSamples (const ComplexT &start_time, const ComplexT &target_time, const Vec< ComplexT > &x_endgame_start, TimeCont< ComplexT > ×, SampCont< ComplexT > &samples) |
| Get the system being tracked on, which is referred to by the tracker. | |
| const T & | Get () const |
| Get the held configuration object of type T. | |
| void | Set (T const &t) |
| Set the held configuration object of type T. | |
| void | AddObserver (AnyObserver &new_observer) const |
| Add an observer (non-owning) to observe this observable. | |
| void | AddObserver (std::shared_ptr< AnyObserver > const &new_observer) const |
| Add an observer whose lifetime is co-owned by this observable. | |
| void | RemoveObserver (AnyObserver &observer) const |
| Remove an observer from this observable. | |
| virtual bool | ObservableIsA (std::type_index t) const |
| Whether this observable may be observed as the given type. | |
Public Attributes | |
| BCT | latest_time_cache_ |
| Scratch so LatestTimeImpl can return a BCT reference in the complex_dbl fast lane. | |
| std::tuple< Ts... > | configuration_ |
| The held configuration objects, one per config type. | |
Protected Types | |
| using | TupleOfTimes = typename BaseEGT::TupleOfTimes |
| A tuple of time containers, one per numeric type. | |
| using | TupleOfSamps = typename BaseEGT::TupleOfSamps |
| A tuple of sample containers, one per numeric type. | |
| using | TupOfVec = typename BaseEGT::TupOfVec |
| A tuple of vector containers, one per numeric type. | |
| using | BCT = BaseComplexT |
| The complex number type. | |
| using | BRT = BaseRealT |
| The real number type. | |
| using | Configs = typename AlgoTraits<FinalEGT>::NeededConfigs |
| The configuration bundle (Configured base). | |
| using | ConfigsAsTuple = typename Configs::ToTuple |
| The configuration structs as a tuple. | |
| using | Configured |
| The Configured base type. | |
| using | NeededTypes |
| Arithmetic types this endgame may compute in (sourced from the tracker). | |
| using | TupOfReal |
| A tuple of real values, one per numeric type. | |
Protected Member Functions | |
| template<typename ComplexT> | |
| void | AssertSizesTimeSpace () const |
| Debug-assert that the stored time and sample containers have consistent, sufficient sizes. | |
| template<typename ComplexT> | |
| void | AssertSizesTimeSpaceDeriv () const |
| Debug-assert that the time, sample, and derivative containers have consistent, sufficient sizes. | |
| void | RefreshCOverKProbe (unsigned size) const |
| Draw the c/k probe direction for a run. | |
| Vec< ComplexT > const & | GetCOverKProbe (unsigned size, unsigned prec) const |
| The fixed random direction the c/k estimate is projected along. | |
| const PowerSeriesEndgame< PrecT > & | AsFlavor () const |
| convert the base endgame into the derived type. | |
| PowerSeriesEndgame< PrecT > & | AsFlavor () |
| Non-const version of AsFlavor. | |
| void | NotifyObservers (AnyEvent const &e) const |
| Sends an event to observers that subscribed to its exact dynamic type, then to all catch-all (untyped) observers. | |
| void | NotifyObservers (AnyEvent &e) const |
| Notify all observers of a (mutable) event. | |
| bool | HasObservers () const |
| Whether anyone is currently observing (conservative). | |
Protected Attributes | |
| unsigned | upper_bound_on_cycle_number_ |
| State variable representing a computed upper bound on the cycle number. | |
| TupleOfTimes | times_ |
| Holds the time values for different space values used in the Power series endgame. | |
| TupleOfSamps | samples_ |
| Holds the space values used in the Power series endgame. | |
| TupleOfSamps | derivatives_ |
| Holds the derivatives at each space point. | |
| TupleOfTimes | c_over_k_ |
| The sliding window of recent c/k estimates, one deque per numeric type. | |
| bool | announced_operating_zone_ = false |
| Whether InEGOperatingZone has been emitted for this run. | |
| TupOfVec | rand_vector_ |
| Random vector used in computing an upper bound on the cycle number. | |
| Vec< BCT > | final_approximation_ |
| The latest computed approximation of the endpoint. | |
| Vec< BCT > | previous_approximation_ |
| The previous approximation of the endpoint. | |
| unsigned int | cycle_number_ |
| The current estimate of the cycle number. | |
| NumErrorT | approximate_error_ |
| The error estimate between successive approximations. | |
| BCT | start_time_ |
| The endgame boundary time; set via SetBoundaryTime(). | |
| BCT | target_time_ |
| The final target time (default 0); set via SetTargetTime(). | |
| Vec< complex_dbl > | c_over_k_probe_as_drawn_ |
| The random direction the c/k estimate is projected along, as drawn: in double precision, so that it is exact in every lane and at every multiple precision. | |
| TupOfVec | c_over_k_probe_ |
| The c/k probe in each numeric type the endgame computes in: exact conversions of c_over_k_probe_as_drawn_, re-derived when their size or precision is wrong, never rounded. | |
class used to finish tracking paths during Homotopy Continuation
The bertini::PowerSeriesEndgame class enables us to finish tracking on possibly singular paths on an arbitrary square homotopy.
The intended usage is to:
Below we demonstrate a basic usage of the PowerSeriesEndgame class to find the singularity at t = 0.
The pattern is as described above: create an instance of the class, feeding it the system to be used, and the endgame boundary time and other variable values at the endgame boundary.
If this documentation is insufficient, please contact the authors with suggestions, or get involved! Pull requests welcomed.
Test suite driving this class: endgames_test.
File: test/endgames/generic_pseg_test.hpp File: test/endgames/amp_powerseries_test.cpp File: test/endgames/fixed_double_powerseries_test.cpp FIle: test/endgames/fixed_multiple_powerseries_test.cpp
| using bertini::endgame::PowerSeriesEndgame< PrecT >::BaseComplexT = typename BaseEGT::BaseComplexT |
The complex number type.
| using bertini::endgame::PowerSeriesEndgame< PrecT >::BaseEGT = EndgameBase<PowerSeriesEndgame<PrecT>, PrecT> |
The base endgame type.
| using bertini::endgame::PowerSeriesEndgame< PrecT >::BaseRealT = typename BaseEGT::BaseRealT |
The real number type.
|
protected |
The complex number type.
|
protected |
The real number type.
|
inherited |
The configuration bundle this endgame reads, public so that generic machinery which works in terms of an object's configs – the Python bindings' ConfiguredVisitor, which needs Config::UsedConfigs – can serve an endgame the same way it serves a tracker or a solver.
The same type as the protected Configured alias below.
|
protected |
The configuration bundle (Configured base).
|
protected |
The configuration structs as a tuple.
|
protectedinherited |
The Configured base type.
| using bertini::endgame::PowerSeriesEndgame< PrecT >::EmitterType = PowerSeriesEndgame<PrecT> |
The event-emitter type.
| using bertini::endgame::PowerSeriesEndgame< PrecT >::FinalEGT = PowerSeriesEndgame<PrecT> |
The final (derived) endgame type.
|
protectedinherited |
Arithmetic types this endgame may compute in (sourced from the tracker).
| using bertini::endgame::PowerSeriesEndgame< PrecT >::TrackerType = typename BaseEGT::TrackerType |
The path-tracker type.
|
protected |
A tuple of sample containers, one per numeric type.
|
protected |
A tuple of time containers, one per numeric type.
|
protectedinherited |
A tuple of real values, one per numeric type.
|
protected |
A tuple of vector containers, one per numeric type.
|
inherited |
The list of configuration types this object holds.
|
inlineexplicit |
Construct the power-series endgame for a tracker, with its configuration as a tuple.
|
inlineexplicit |
Construct the power-series endgame for a tracker, with configs given in any order.
|
virtualdefault |
|
inlineinherited |
Add an observer (non-owning) to observe this observable.
Stores only a raw reference: the caller is responsible for keeping the observer alive while it is attached. This is the right overload for stack-allocated C++ observers added and removed within a scope. For an observer whose lifetime you would rather have tracked, see the shared_ptr overload.
Observers that override SubscribedEventTypes() with a non-empty list are registered in a type-indexed map so NotifyObservers only calls them for events they declared interest in. Observers returning an empty list (the default) are placed in a catch-all list and receive every event.
Safe to call from inside an observer's Observe() (i.e. during a notification): the add is deferred and applied once the current notification loop finishes. This is what lets a "meta-observer" attach new observers in response to events.
| IncompatibleObserver | if the observer's ObservedKind() is not one this observable can be observed as. |
|
inlineinherited |
Add an observer whose lifetime is co-owned by this observable.
The observable keeps a shared_ptr, so the observer stays alive (and keeps receiving events) for as long as it is attached, even after the caller drops their own reference — "attach it and forget it", with no dangling. It is released when RemoveObserver is called or this observable is destroyed. (Stack-allocated C++ observers can't be shared_ptr-owned; use the reference overload for those.)
| IncompatibleObserver | if incompatible (see the reference overload). |
|
inline |
The samples used in the power series endgame are collected by advancing time to t = 0, by multiplying the current time by the sample factor.
target_time: This is the time we are trying to approximate, default is t = 0.
SuccessCode: This reports back if we were successful in advancing time.
| ComplexT | The complex number type. This function computes the next time value for the power series endgame. After computing this time value, it will track to it and compute the derivative at this time value for further appoximations to be made during the endgame. |
|
inline |
Advance time at the active numeric type, migrating-and-retrying in mpfr on escalation.
|
inlineinherited |
Get the most recent accuracy estimate.
|
inlineprotectedinherited |
Non-const version of AsFlavor.
|
inlineprotectedinherited |
convert the base endgame into the derived type.
This enables the CRPT as used by the endgames
|
inlineprotected |
Debug-assert that the stored time and sample containers have consistent, sufficient sizes.
|
inlineprotected |
Debug-assert that the time, sample, and derivative containers have consistent, sufficient sizes.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Have the last few c/k estimates settled to within the user's threshold?
The operating-zone test: consecutive estimates agreeing to within minimum_for_c_over_k_stabilization, for num_needed_for_stabilization of them, is taken as the cycle-number estimate having settled. Both endgames use this and mean the same thing by it (b2#402).
| T | The element type of the estimate window; real or complex, since only its magnitude is read (the Cauchy endgame keeps reals, the power series endgame keeps its numeric type). |
| c_over_k_array | The estimates so far, oldest first. |
|
inline |
Function that clears all samples and times from data members for the Power Series endgame.
|
inline |
|
inline |
Compute all sample derivatives at the active numeric type.
|
inline |
Compute the power-series extrapolation at the active numeric type, writing into final_approximation_ (BCT).
|
inline |
This function computes an approximation of the space value at the time time_t0.
result: Passed by reference this holds the value of the approximation we compute t0: This is the time value for which we wish to compute an approximation at.
SuccessCode: This reports back if we were successful in making an approximation.
| ComplexT | The complex number type. This function handles computing an approximation at the origin. We compute the cycle number best for the approximation, and convert derivatives and times to the s-plane where s = t^(1/c). We use the converted times and derivatives along with the samples to do a Hermite interpolation. |
|
inline |
Computes an upper bound on the cycle number.
Consult page 53 of [4].
None: all data needed are class data members.
upper_bound_on_cycle_number_: Used for an exhaustive search for the best cycle number for approimating the path to t = 0.
| ComplexT | The complex number type. |
|
inlineinherited |
An estimate of c/k from the three most recent geometric samples.
Assumes the path is in the endgame operating zone, where the Puiseux asymptotics dominate; as the cycle-number estimate settles, successive values of this estimate settle with it, which is what CheckForCOverKStabilization watches for.
It reads only the geometrically-spaced approach samples and the fixed probe, which every endgame flavor maintains – the power series endgame's samples_ and the Cauchy endgame's pseg_samples_ are the same window under two names – so it belongs here rather than to either flavor (b2#402). Consult page 53 of [4] for the heuristic.
| ComplexT | The complex number type. |
| samples | The geometric approach samples; the first three are used. |
|
inline |
This function computes the cycle number using an exhaustive search up the upper bound computed by the above function BoundOnCyleNumber.
## Input:
None: all data needed are class data members.
## Output:
cycle_number_: Used to create a hermite interpolation to t = 0.
##Details:
\tparam ComplexT The complex number type.
This is done by an exhaustive search from 1 to upper_bound_on_cycle_number. There is a conversion to the s-space from t-space in this function.
As a by-product the derivatives at each of the samples is returned for further use.
|
inlineinherited |
Get the system being tracked on, which is referred to by the tracker.
Populates time and space samples so that we are ready to start the endgame.
start_time: is the time when we start the endgame process usually this is .1
x_endgame_start: is the space value at start_time
times: a deque of time values. These values will be templated to be ComplexT
samples: a deque of sample values that are in correspondence with the values in times. These values will be vectors with entries of ComplexT.
SuccessCode indicating whether tracking to all samples was successful.
The first sample will be (x_endgame_start) and the first time is start_time. From there we do a geometric progression using the sample factor (which by default is 1/2). Hence, next_time = start_time * sample_factor. We track then to the next_time and construct the next_sample.
| start_time | The time value at which we start the endgame. |
| target_time | The time value that we are trying to find a solution to. |
| x_endgame_start | The current space point at start_time. |
| times | A deque that will hold all the time values of the samples we are going to use to start the endgame. |
| samples | a deque that will hold all the samples corresponding to the time values in times. |
| ComplexT | The complex number type. |
|
inlineinherited |
|
inlineinherited |
Set the cycle number.
|
inlineinherited |
Announce a completed sample point on the path, as a ComputedSamplePoint.
The payload rides at BaseComplexT, so the adaptive endgame's hardware-double fast lane must convert – and only pays for that when something is actually observing. Shared by the initial window here and by each flavor's time advance, so the conversion rule lives in one place.
| sample | The newly completed sample point on the path. |
| time | The time value at which it was computed. |
| ComplexT | The complex number type the endgame is currently working in. |
|
inlineinherited |
This function is inferior to the templated Get<ConfigT> function provided.
|
inlineinherited |
Track through the tracker, adapting at the numeric-type boundary.
The tracker's TrackPath I/O is fixed to BaseComplexT (its TrackerLoopInitialization / CopySolution are non-templatable virtuals). When the adaptive-numeric-type endgame is computing in the hardware complex_dbl fast lane (ComplexT != BCT, i.e. the AMP case), we convert at the boundary: hand the tracker mpfr points at DoublePrecision – so the AMP tracker uses its hardware-double slot internally – then downcast the result back to complex_dbl. If the tracker escalated internally (GetCurrentPrecision() > DoublePrecision()), the caller's escalation hook discards this result and migrates the endgame to mpfr, so the truncating downcast is harmless.
When ComplexT == BCT (every fixed-precision tracker, and the AMP endgame's mpfr lane) this is a direct, zero-overhead call to the tracker – byte-identical to calling TrackPath itself.
MICRO-OPT (future): a native complex_dbl TrackPath overload on the AMP tracker would remove the boundary conversion churn (~1-2% of a track). Deferred – see the sprint notes.
|
inlineinherited |
Raise the endgame to the next precision and migrate the containers' complex_dbl slot up to complex_mp when the tracker's authority escalates.
|
inlineinherited |
Get the most-recent approximation.
|
inlineinherited |
Get the final tolerance to which we are tracking the solution.
|
inlineinherited |
Get the held configuration object of type T.
|
inlineprotectedinherited |
The fixed random direction the c/k estimate is projected along.
An exact conversion of the direction as drawn, at the requested precision. Converted, not rounded in place: the drawn values are doubles, which every multiple precision holds exactly, so the direction is the same in both lanes and survives any change of precision.
| ComplexT | The complex number type. |
| size | The number of coordinates the probe must have. |
| prec | The working precision to supply it at. |
|
inline |
Function to get the space values used for the Power Series endgame.
|
inline |
Function to get the times used for the Power Series endgame.
|
inlineprotectedinherited |
Whether anyone is currently observing (conservative).
Lets an emitter skip constructing an event – and any work needed to build its payload, such as a numeric-type conversion – when there is no observer to receive it. Conservative: returns true if any watcher list is non-empty (even if a stale, emptied typed bucket lingers), so it never wrongly suppresses a real observer.
|
inlineinherited |
Increase the cycle number by the given increment.
|
inlineinherited |
Get the latest time at which a point on the path was computed.
|
inline |
|
inline |
Widen this flavor's PowerSeries containers from the complex_dbl slot up to complex_mp at the new precision.
|
inline |
Watch the c/k estimates settle, and say so once when they have.
InEGOperatingZone announces that the path has reached the asymptotic regime, where the Puiseux model the endgame is built on dominates. That is what makes the samples usable quantitatively, so a consumer that is told it every advance is being told nothing.
The window slides, exactly as the Cauchy endgame's does, so the test reads the most recent estimates rather than the first ever taken.
| ComplexT | The complex number type. |
| samples | The current geometric window; at least three are needed for an estimate. |
|
inlineprotectedinherited |
Notify all observers of a (mutable) event.
|
inlineprotectedinherited |
Sends an event to observers that subscribed to its exact dynamic type, then to all catch-all (untyped) observers.
Mutations of the observer lists are deferred for the duration of a notification (see AddObserver/RemoveObserver), so iterating the live lists here is safe even when an observer subscribes/unsubscribes mid-dispatch. An observer that returns ObserveResult::Unsubscribe is dropped once the (possibly nested) notification completes. The depth counter keeps this correct under re-entrant emission.
|
inlinevirtualinherited |
Whether this observable may be observed as the given type.
Drives the compatibility check in AddObserver. The default accepts the wildcard typeid(void) and this observable's own dynamic type. An observable that emits its events templated on a base type (so a single observer type serves many concrete observables) should also accept that base type — e.g. ZeroDim accepts AnyZeroDim.
|
inlineinherited |
Get the second-most-recent approximation.
|
inlineinherited |
Refine every sample point to the endgame's refinement tolerance.
|
inline |
Refine all retained samples at the active numeric type, migrating-and-retrying in mpfr on escalation.
|
inlineinherited |
A function passed off to the precision-specific endgame part.
Templated on ComplexT so the adaptive-numeric-type endgame can refine in the hardware-complex_dbl fast lane as well as in complex_mp. The precision policy (FixedPrecEndgame / AMPEndgame) provides the matching RefineSampleImpl overload(s). Fixed precision only ever instantiates this at BCT.
|
inlineprotectedinherited |
Draw the c/k probe direction for a run.
Called at the start of every run, after whatever reseed the caller does for the path, so the direction is a function of the random-number stream at that point and nothing else.
| size | The number of coordinates the probe must have. |
|
inlineinherited |
Remove an observer from this observable.
Like AddObserver, this is safe to call during a notification: the removal is deferred until the current notification loop finishes.
|
inlineinherited |
Run the endgame from the stored boundary time to the stored target time.
Re-precisions the stored times to match start_point before dispatching to RunImpl, so the caller never needs to worry about precision alignment.
Call SetBoundaryTime() before invoking Run().
|
inline |
Primary function running the Power Series endgame.
start_time: This is the time value for which the endgame begins, by default this is t = 0.1 start_point: An approximate solution of the homotopy at t = start_time target_time: The time value that we are wishing to approximate to. This is default set to t = 0.
SuccessCode: This reports back if we were successful in advancing time.
| ComplexT | The complex number type. Tracking forward with the number of sample points, this function will make approximations using Hermite interpolation. This process will continue until two consecutive approximations are withing final tolerance of each other. |
|
inline |
Run the power-series endgame via the double-first adaptive-numeric-type driver, migrating up to mpfr only on tracker escalation.
|
inlineinherited |
|
inlineinherited |
Set the held configuration object of type T.
|
inlineinherited |
Set the endgame boundary (start) time.
|
inlineinherited |
Setter for the final tolerance.
|
inline |
Function to set the times used for the Power Series endgame.
|
inline |
Function to set the space values used for the Power Series endgame.
|
inlineinherited |
Set the final target time.
|
inline |
Function to set the times used for the Power Series endgame.
|
inline |
Run the pre-loop setup and first extrapolation in a given numeric type, reporting escalation up to the driver.
|
inlineinherited |
|
inline |
Transform the stored times and derivatives into the S-plane, scaled by the cycle number.
This function transforms the times and derivatives into the S-plane, scaled by the cycle number, and maps them into the interval [0, 1].
| cycle_num | The cycle number to use. |
| t0 | The base time value of the transform. |
| num_pts | The number of points to transform. |
| shift_from | Which end of the sample containers to transform from. |
|
inline |
|
mutableprotected |
Whether InEGOperatingZone has been emitted for this run.
The event says the path has ENTERED the zone, which happens once; it is not a per-advance heartbeat.
|
mutableprotectedinherited |
The error estimate between successive approximations.
Initialized to infinity, not left indeterminate: ApproximateError() is a public accessor, so a caller may read it before any endgame has run. Infinity is also the only safe sentinel here – every convergence gate in the flavors has the shape approximate_error_ < FinalTolerance(), and an indeterminate value that happened to be small would be a false convergence.
|
mutableprotected |
The sliding window of recent c/k estimates, one deque per numeric type.
Kept at num_needed_for_stabilization + 1 entries, so the stabilization test always reads the most recent estimates rather than the first ones ever taken – the same window the Cauchy endgame keeps (b2#402).
|
mutableprotectedinherited |
The c/k probe in each numeric type the endgame computes in: exact conversions of c_over_k_probe_as_drawn_, re-derived when their size or precision is wrong, never rounded.
|
mutableprotectedinherited |
The random direction the c/k estimate is projected along, as drawn: in double precision, so that it is exact in every lane and at every multiple precision.
Drawn at the start of every run (RefreshCOverKProbe) and fixed for the run, so consecutive estimates differ only because the samples differ. A fresh random probe every call made the stabilization test noisy – it could certify the operating zone spuriously – and churned mpfr allocations. See z_notes/20260629.
|
inherited |
The held configuration objects, one per config type.
|
mutableprotectedinherited |
The current estimate of the cycle number.
|
mutableprotected |
Holds the derivatives at each space point.
|
mutableprotectedinherited |
The latest computed approximation of the endpoint.
|
mutable |
Scratch so LatestTimeImpl can return a BCT reference in the complex_dbl fast lane.
|
mutableprotectedinherited |
The previous approximation of the endpoint.
|
mutableprotected |
Random vector used in computing an upper bound on the cycle number.
Dual-slot (TupOfVec) so the adaptive-numeric-type endgame can form the cycle-number dot products in the active type (it is multiplied against Vec<ComplexT> sample differences, which must match scalar type). Single-slot for fixed precision, as before.
|
mutableprotected |
Holds the space values used in the Power series endgame.
|
protectedinherited |
The endgame boundary time; set via SetBoundaryTime().
|
protectedinherited |
The final target time (default 0); set via SetTargetTime().
|
mutableprotected |
Holds the time values for different space values used in the Power series endgame.
|
mutableprotected |
State variable representing a computed upper bound on the cycle number.