|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
Example usage: PathAccumulator<AMPTracker> path_accumulator;. More...
#include <observers.hpp>
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. | |
Example usage: PathAccumulator<AMPTracker> path_accumulator;.
Observer that accumulates the current space point at each event of type EventT.
|
virtualdefault |
|
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 |
On each observed event, append the tracker's current point to the path.
|
inline |
Get the accumulated path of space points.
|
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.