|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
Type-erased base for a zero-dimensional solve, exposing output and config entry points. More...
#include <zero_dim_solve.hpp>
Public Member Functions | |
| virtual void | WriteMainData (std::ostream &out) const =0 |
Write the human-readable main-data report to out. | |
| virtual void | WriteRawData (std::ostream &out) const =0 |
Write the raw-data report to out. | |
| virtual void | WriteFiniteSolutions (std::ostream &out) const =0 |
Write the finite solutions (Bertini 1.7 format) to out. | |
| virtual void | WriteRealFiniteSolutions (std::ostream &out) const =0 |
Write the real finite solutions (Bertini 1.7 format) to out. | |
| virtual void | WriteNonsingularSolutions (std::ostream &out) const =0 |
Write the nonsingular solutions (Bertini 1.7 format) to out. | |
| virtual void | WriteSingularSolutions (std::ostream &out) const =0 |
Write the singular solutions (Bertini 1.7 format) to out. | |
| virtual void | WriteRawSolutions (std::ostream &out) const =0 |
Write the raw solutions (Bertini 1.7 format) to out. | |
| virtual void | ApplyParsedConfigs (std::string const &config_str)=0 |
| Apply configuration settings parsed from a classic-input config string. | |
| virtual void | RecordToPath (std::string const &) |
Attach a structured output directory at path (records + resume; ADR-0046). | |
| virtual std::string | RecordsRunIdentity () const |
| This solve's run id in the records (empty when not recording). | |
| virtual void | AppendRecordJson (std::string const &) |
| Append one raw record (a JSON object as text) to the attached directory; no-op when not recording. | |
| virtual std::string | PutRecordsDefinition (std::string const &, std::string const &, std::string const &={}) |
| Store content as a definition of the given kind ("systems"/"configs"/ "givens"), optionally labeled by role in the filename (e.g. | |
| virtual | ~AnyZeroDim ()=default |
| virtual void | Run ()=0 |
| Run the algorithm. | |
| void | AddObserver (AnyObserver &new_observer) const |
| Add an observer (non-owning) to observe this observable. | |
| void | AddObserver (std::shared_ptr< AnyObserver > const &new_observer) const |
| Add an observer whose lifetime is co-owned by this observable. | |
| void | RemoveObserver (AnyObserver &observer) const |
| Remove an observer from this observable. | |
| virtual bool | ObservableIsA (std::type_index t) const |
| Whether this observable may be observed as the given type. | |
Protected Member Functions | |
| void | NotifyObservers (AnyEvent const &e) const |
| Sends an event to observers that subscribed to its exact dynamic type, then to all catch-all (untyped) observers. | |
| void | NotifyObservers (AnyEvent &e) const |
| Notify all observers of a (mutable) event. | |
| bool | HasObservers () const |
| Whether anyone is currently observing (conservative). | |
Type-erased base for a zero-dimensional solve, exposing output and config entry points.
|
virtualdefault |
|
inlineinherited |
Add an observer (non-owning) to observe this observable.
Stores only a raw reference: the caller is responsible for keeping the observer alive while it is attached. This is the right overload for stack-allocated C++ observers added and removed within a scope. For an observer whose lifetime you would rather have tracked, see the shared_ptr overload.
Observers that override SubscribedEventTypes() with a non-empty list are registered in a type-indexed map so NotifyObservers only calls them for events they declared interest in. Observers returning an empty list (the default) are placed in a catch-all list and receive every event.
Safe to call from inside an observer's Observe() (i.e. during a notification): the add is deferred and applied once the current notification loop finishes. This is what lets a "meta-observer" attach new observers in response to events.
| IncompatibleObserver | if the observer's ObservedKind() is not one this observable can be observed as. |
|
inlineinherited |
Add an observer whose lifetime is co-owned by this observable.
The observable keeps a shared_ptr, so the observer stays alive (and keeps receiving events) for as long as it is attached, even after the caller drops their own reference — "attach it and forget it", with no dangling. It is released when RemoveObserver is called or this observable is destroyed. (Stack-allocated C++ observers can't be shared_ptr-owned; use the reference overload for those.)
| IncompatibleObserver | if incompatible (see the reference overload). |
|
inlinevirtual |
Append one raw record (a JSON object as text) to the attached directory; no-op when not recording.
Lets the CLI archive its input file as a given.
Reimplemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
pure virtual |
Apply configuration settings parsed from a classic-input config string.
Implemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
inlineprotectedinherited |
Whether anyone is currently observing (conservative).
Lets an emitter skip constructing an event – and any work needed to build its payload, such as a numeric-type conversion – when there is no observer to receive it. Conservative: returns true if any watcher list is non-empty (even if a stale, emptied typed bucket lingers), so it never wrongly suppresses a real observer.
|
inlineprotectedinherited |
Notify all observers of a (mutable) event.
|
inlineprotectedinherited |
Sends an event to observers that subscribed to its exact dynamic type, then to all catch-all (untyped) observers.
Mutations of the observer lists are deferred for the duration of a notification (see AddObserver/RemoveObserver), so iterating the live lists here is safe even when an observer subscribes/unsubscribes mid-dispatch. An observer that returns ObserveResult::Unsubscribe is dropped once the (possibly nested) notification completes. The depth counter keeps this correct under re-entrant emission.
|
inlinevirtualinherited |
Whether this observable may be observed as the given type.
Drives the compatibility check in AddObserver. The default accepts the wildcard typeid(void) and this observable's own dynamic type. An observable that emits its events templated on a base type (so a single observer type serves many concrete observables) should also accept that base type — e.g. ZeroDim accepts AnyZeroDim.
Reimplemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
inlinevirtual |
Store content as a definition of the given kind ("systems"/"configs"/ "givens"), optionally labeled by role in the filename (e.g.
"cli_input"), in the attached directory; returns its id (empty when not recording).
Reimplemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
inlinevirtual |
This solve's run id in the records (empty when not recording).
Reimplemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
inlinevirtual |
Attach a structured output directory at path (records + resume; ADR-0046).
Default no-op so non-recording derivers are unaffected; HomotopySolver overrides.
Reimplemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
inlineinherited |
Remove an observer from this observable.
Like AddObserver, this is safe to call during a notification: the removal is deferred until the current notification loop finishes.
|
pure virtualinherited |
|
pure virtual |
Write the finite solutions (Bertini 1.7 format) to out.
Implemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
pure virtual |
Write the human-readable main-data report to out.
Implemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
pure virtual |
Write the nonsingular solutions (Bertini 1.7 format) to out.
Implemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
pure virtual |
Write the raw-data report to out.
Implemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
pure virtual |
Write the raw solutions (Bertini 1.7 format) to out.
Implemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
pure virtual |
Write the real finite solutions (Bertini 1.7 format) to out.
Implemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.
|
pure virtual |
Write the singular solutions (Bertini 1.7 format) to out.
Implemented in bertini::algorithm::HomotopySolver< TrackerType, EndgameType, SystemType >, and bertini::algorithm::HomotopySolver< A, B, C >.