|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
Observer that records the starting precision and the first precision increase of each track: each call to TrackPath, from its start. More...
#include <observers.hpp>
Public Member Functions | |
| ObserveResult | OnEvent (Initializing< EmitterT, BCT > const &) |
| A track begins: the record starts afresh. | |
| ObserveResult | OnEvent (TrackingStarted< EmitterT > const &e) |
| Tracking starts after the start point is refined: the start precision, unless a refinement change already gave it. | |
| ObserveResult | OnEvent (PrecisionChanged< EmitterT > const &e) |
| A change of precision: the first one gives the start precision, and the first increase is recorded. | |
| unsigned | StartPrecision () const |
| Get the precision tracking started at. | |
| unsigned | NextPrecision () const |
| Get the precision after the first increase. | |
| bool | DidPrecisionIncrease () const |
| Query whether precision increased at all during the track. | |
| TrackerTraits< TrackerT >::BaseComplexT | TimeOfIncrease () const |
| Get the time value at which precision first increased. | |
| virtual | ~FirstPrecisionRecorder ()=default |
| std::vector< std::type_index > | SubscribedEventTypes () const override |
| Declares which event types this observer wants to receive. | |
| ObserveResult | Observe (AnyEvent const &e) override |
| Observe the observable object being observed. | |
| std::type_index | ObservedKind () const override |
| The type this observer expects to observe. | |
Observer that records the starting precision and the first precision increase of each track: each call to TrackPath, from its start.
A track begins with the tracker's Initializing event, which comes before the start point is refined, so an increase that the refinement needs counts as the track's first. The record starts afresh with each track, and the observer stays attached: attach it once and it reports every track, including one whose initialization fails.
For a whole path, which the endgame tracks in many calls, see PathPrecisionRecorder.
|
virtualdefault |
|
inline |
Query whether precision increased at all during the track.
|
inline |
Get the precision after the first increase.
|
inlineoverridevirtualinherited |
Observe the observable object being observed.
This is probably in response to NotifyObservers.
This virtual function must be overridden by actual observers, defining how they observe the observable they are observing, probably filtering events and doing something specific for different ones.
| e | The event which was emitted by the observed object. |
Implements bertini::AnyObserver.
|
inlineoverridevirtualinherited |
The type this observer expects to observe.
Used by Observable::AddObserver to reject attaching an observer to an incompatible observable (which would otherwise silently never fire). The default is typeid(void), a wildcard meaning "attach me anywhere"; Observer<ObservedT> reports typeid(ObservedT).
Reimplemented from bertini::AnyObserver.
|
inline |
A track begins: the record starts afresh.
|
inline |
A change of precision: the first one gives the start precision, and the first increase is recorded.
|
inline |
Tracking starts after the start point is refined: the start precision, unless a refinement change already gave it.
|
inline |
Get the precision tracking started at.
|
inlineoverridevirtualinherited |
Declares which event types this observer wants to receive.
Return a non-empty vector to opt into type-indexed dispatch: the observable will only call Observe() for events whose dynamic type exactly matches one of the returned type_index values. Return an empty vector (the default) to receive every event — this is the correct choice for observers that handle many or all event types, and is the automatic behavior for Python-defined observers.
Reimplemented from bertini::AnyObserver.
|
inline |
Get the time value at which precision first increased.