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

Observer that records the minimum and maximum precision of each track: each call to TrackPath, from its start. More...

#include <observers.hpp>

Inheritance diagram for bertini::tracking::MinMaxPrecisionRecorder< TrackerT >:
[legend]
Collaboration diagram for bertini::tracking::MinMaxPrecisionRecorder< 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: include the precision it starts at.
ObserveResult OnEvent (PrecisionChanged< EmitterT > const &e)
 A change of precision: include both ends of it.
unsigned MinPrecision () const
 Get the minimum precision observed.
unsigned MaxPrecision () const
 Get the maximum precision observed.
void MinPrecision (unsigned m)
 Set the recorded minimum precision.
void MaxPrecision (unsigned m)
 Set the recorded maximum precision.
virtual ~MinMaxPrecisionRecorder ()=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::MinMaxPrecisionRecorder< TrackerT >

Observer that records the minimum and maximum precision of each track: each call to TrackPath, from its start.

A track begins with the tracker's Initializing event, before the start point is refined, so the precision the track started at, and any the refinement moved through, count.

For a whole path, which the endgame tracks in many calls, see PathPrecisionRecorder.

Constructor & Destructor Documentation

◆ ~MinMaxPrecisionRecorder()

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

Member Function Documentation

◆ MaxPrecision() [1/2]

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

Get the maximum precision observed.

◆ MaxPrecision() [2/2]

template<class TrackerT>
void bertini::tracking::MinMaxPrecisionRecorder< TrackerT >::MaxPrecision ( unsigned m)
inline

Set the recorded maximum precision.

◆ MinPrecision() [1/2]

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

Get the minimum precision observed.

◆ MinPrecision() [2/2]

template<class TrackerT>
void bertini::tracking::MinMaxPrecisionRecorder< TrackerT >::MinPrecision ( unsigned m)
inline

Set the recorded minimum precision.

◆ Observe()

ObserveResult bertini::TypedObserver< MinMaxPrecisionRecorder< 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::MinMaxPrecisionRecorder< TrackerT >::OnEvent ( Initializing< EmitterT, BCT > const & )
inline

A track begins: the record starts afresh.

◆ OnEvent() [2/3]

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

A change of precision: include both ends of it.

◆ OnEvent() [3/3]

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

Tracking starts: include the precision it starts at.

◆ SubscribedEventTypes()

std::vector< std::type_index > bertini::TypedObserver< MinMaxPrecisionRecorder< 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.