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

Example usage: PathAccumulator<AMPTracker> path_accumulator;. More...

#include <observers.hpp>

Inheritance diagram for bertini::tracking::AMPPathAccumulator< TrackerT, EventT >:
[legend]
Collaboration diagram for bertini::tracking::AMPPathAccumulator< TrackerT, EventT >:
[legend]

Public Member Functions

ObserveResult OnEvent (EventT< EmitterT > const &e)
 On each observed event, append the tracker's current point to the path.
const std::vector< Vec< complex_mp > > & Path () const
 Get the accumulated path of space points.
virtual ~AMPPathAccumulator ()=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, template< class > class EventT = SuccessfulStep>
class bertini::tracking::AMPPathAccumulator< TrackerT, EventT >

Example usage: PathAccumulator<AMPTracker> path_accumulator;.

Observer that accumulates the current space point at each event of type EventT.

Constructor & Destructor Documentation

◆ ~AMPPathAccumulator()

template<class TrackerT, template< class > class EventT = SuccessfulStep>
virtual bertini::tracking::AMPPathAccumulator< TrackerT, EventT >::~AMPPathAccumulator ( )
virtualdefault

Member Function Documentation

◆ Observe()

ObserveResult bertini::TypedObserver< AMPPathAccumulator< TrackerT, SuccessfulStep >, 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()

template<class TrackerT, template< class > class EventT = SuccessfulStep>
ObserveResult bertini::tracking::AMPPathAccumulator< TrackerT, EventT >::OnEvent ( EventT< EmitterT > const & e)
inline

On each observed event, append the tracker's current point to the path.

◆ Path()

template<class TrackerT, template< class > class EventT = SuccessfulStep>
const std::vector< Vec< complex_mp > > & bertini::tracking::AMPPathAccumulator< TrackerT, EventT >::Path ( ) const
inline

Get the accumulated path of space points.

◆ SubscribedEventTypes()

std::vector< std::type_index > bertini::TypedObserver< AMPPathAccumulator< TrackerT, SuccessfulStep >, 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.