Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
bertini::tracking::FirstPrecisionRecorder< TrackerT > Class Template Reference

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>

Inheritance diagram for bertini::tracking::FirstPrecisionRecorder< TrackerT >:
[legend]
Collaboration diagram for bertini::tracking::FirstPrecisionRecorder< TrackerT >:
[legend]

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.

Detailed Description

template<class TrackerT>
class bertini::tracking::FirstPrecisionRecorder< TrackerT >

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.

Constructor & Destructor Documentation

◆ ~FirstPrecisionRecorder()

template<class TrackerT>
virtual bertini::tracking::FirstPrecisionRecorder< TrackerT >::~FirstPrecisionRecorder ( )
virtualdefault

Member Function Documentation

◆ DidPrecisionIncrease()

template<class TrackerT>
bool bertini::tracking::FirstPrecisionRecorder< TrackerT >::DidPrecisionIncrease ( ) const
inline

Query whether precision increased at all during the track.

◆ NextPrecision()

template<class TrackerT>
unsigned bertini::tracking::FirstPrecisionRecorder< TrackerT >::NextPrecision ( ) const
inline

Get the precision after the first increase.

◆ Observe()

ObserveResult bertini::TypedObserver< FirstPrecisionRecorder< TrackerT >, TrackerT, ConcreteEvents >::Observe ( AnyEvent const & e)
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.

Parameters
eThe event which was emitted by the observed object.
Returns
ObserveResult::KeepObserving to keep receiving events, or ObserveResult::Unsubscribe to ask the observable to drop this observer once the current notification finishes.

Implements bertini::AnyObserver.

◆ ObservedKind()

std::type_index bertini::Observer< TrackerT >::ObservedKind ( ) const
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.

◆ OnEvent() [1/3]

template<class TrackerT>
ObserveResult bertini::tracking::FirstPrecisionRecorder< TrackerT >::OnEvent ( Initializing< EmitterT, BCT > const & )
inline

A track begins: the record starts afresh.

◆ OnEvent() [2/3]

template<class TrackerT>
ObserveResult bertini::tracking::FirstPrecisionRecorder< TrackerT >::OnEvent ( PrecisionChanged< EmitterT > const & e)
inline

A change of precision: the first one gives the start precision, and the first increase is recorded.

◆ OnEvent() [3/3]

template<class TrackerT>
ObserveResult bertini::tracking::FirstPrecisionRecorder< TrackerT >::OnEvent ( TrackingStarted< EmitterT > const & e)
inline

Tracking starts after the start point is refined: the start precision, unless a refinement change already gave it.

◆ StartPrecision()

template<class TrackerT>
unsigned bertini::tracking::FirstPrecisionRecorder< TrackerT >::StartPrecision ( ) const
inline

Get the precision tracking started at.

◆ SubscribedEventTypes()

std::vector< std::type_index > bertini::TypedObserver< FirstPrecisionRecorder< TrackerT >, TrackerT, ConcreteEvents >::SubscribedEventTypes ( ) const
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.

◆ TimeOfIncrease()

template<class TrackerT>
TrackerTraits< TrackerT >::BaseComplexT bertini::tracking::FirstPrecisionRecorder< TrackerT >::TimeOfIncrease ( ) const
inline

Get the time value at which precision first increased.