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

Observer that records the precision a whole path used, across every call to TrackPath that tracks it: the track to the endgame boundary and every endgame sub-track. More...

#include <observers.hpp>

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

Public Member Functions

void Reset ()
 Start the record of a new path.
ObserveResult OnEvent (TrackingStarted< EmitterT > const &e)
 A track of the path starts: include the precision it starts at.
ObserveResult OnEvent (PrecisionChanged< EmitterT > const &e)
 A change of precision: include both ends, and record the path's first increase.
bool DidPrecisionIncrease () const
 Whether precision increased anywhere on the path.
TrackerTraits< TrackerT >::BaseComplexT TimeOfIncrease () const
 The time of the path's first precision increase.
unsigned MinPrecision () const
 The lowest precision the path used; the maximum unsigned value if it saw none.
unsigned MaxPrecision () const
 The highest precision the path used; 0 if it saw none.
virtual ~PathPrecisionRecorder ()=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::PathPrecisionRecorder< TrackerT >

Observer that records the precision a whole path used, across every call to TrackPath that tracks it: the track to the endgame boundary and every endgame sub-track.

Unlike the per-track recorders, it never starts afresh on its own: its owner calls Reset when a path begins, and reads it when the path ends. The zero-dim solver uses it for each path's precision_changed, time_of_first_prec_increase and max_precision_used.

Constructor & Destructor Documentation

◆ ~PathPrecisionRecorder()

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

Member Function Documentation

◆ DidPrecisionIncrease()

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

Whether precision increased anywhere on the path.

◆ MaxPrecision()

template<class TrackerT>
unsigned bertini::tracking::PathPrecisionRecorder< TrackerT >::MaxPrecision ( ) const
inline

The highest precision the path used; 0 if it saw none.

◆ MinPrecision()

template<class TrackerT>
unsigned bertini::tracking::PathPrecisionRecorder< TrackerT >::MinPrecision ( ) const
inline

The lowest precision the path used; the maximum unsigned value if it saw none.

◆ Observe()

ObserveResult bertini::TypedObserver< PathPrecisionRecorder< 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/2]

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

A change of precision: include both ends, and record the path's first increase.

◆ OnEvent() [2/2]

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

A track of the path starts: include the precision it starts at.

◆ Reset()

template<class TrackerT>
void bertini::tracking::PathPrecisionRecorder< TrackerT >::Reset ( )
inline

Start the record of a new path.

◆ SubscribedEventTypes()

std::vector< std::type_index > bertini::TypedObserver< PathPrecisionRecorder< 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::PathPrecisionRecorder< TrackerT >::TimeOfIncrease ( ) const
inline

The time of the path's first precision increase.