|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
Classes | |
| class | DrawStream |
| A deterministic, fully-specified random stream (SHA-256 counter mode). More... | |
| class | OutputDirectory |
| One structured output directory: definitions/ + history/ + derived views. More... | |
Functions | |
| std::string | CanonicalName (tracking::Predictor p) |
| The fixed canonical name of a predictor choice (never its numeric value). | |
| std::string | CanonicalName (algorithm::classic::AlgoChoice a) |
| The fixed canonical name of an algorithm (track-type) choice. | |
| std::string | CanonicalName (algorithm::classic::EndgameChoice e) |
| The fixed canonical name of an endgame choice. | |
| std::string | CanonicalEncoding (tracking::SteppingConfig const &c) |
| Canonical encoding of stepping settings. | |
| std::string | CanonicalEncoding (tracking::NewtonConfig const &c) |
| Canonical encoding of Newton-corrector settings. | |
| std::string | CanonicalEncoding (tracking::FixedPrecisionConfig const &c) |
| Canonical encoding of fixed-precision settings. | |
| std::string | CanonicalEncoding (tracking::AdaptiveMultiplePrecisionConfig const &c) |
| Canonical encoding of adaptive-multiple-precision settings. | |
| std::string | CanonicalEncoding (tracking::Predictor p) |
| Canonical encoding of a predictor choice (as a one-field pseudo-config). | |
| std::string | CanonicalEncoding (tracking::TrackerConfig const &c) |
| Canonical encoding of the tracker's own settings (predictor and its two thresholds). | |
| std::string | CanonicalEncoding (endgame::SecurityConfig const &c) |
| Canonical encoding of endgame security (divergence-bailout) settings. | |
| std::string | CanonicalEncoding (endgame::EndgameConfig const &c) |
| Canonical encoding of common endgame settings. | |
| std::string | CanonicalEncoding (endgame::PowerSeriesConfig const &c) |
| Canonical encoding of power-series-endgame settings. | |
| std::string | CanonicalEncoding (endgame::CauchyConfig const &c) |
| Canonical encoding of Cauchy-endgame settings. | |
| std::string | CanonicalEncoding (endgame::TrackBackConfig const &c) |
| Canonical encoding of track-back endgame settings. | |
| std::string | CanonicalEncoding (algorithm::TolerancesConfig const &c) |
| Canonical encoding of Newton/path tolerances. | |
| std::string | CanonicalEncoding (algorithm::MidPathConfig const &c) |
| Canonical encoding of midpath (path-crossing check) settings. | |
| std::string | CanonicalEncoding (algorithm::AutoRetrackConfig const &c) |
| Canonical encoding of crossed-path auto-retrack settings. | |
| std::string | CanonicalEncoding (algorithm::SharpeningConfig const &c) |
| Canonical encoding of solution-sharpening settings. | |
| std::string | CanonicalEncoding (algorithm::RegenerationConfig const &c) |
| Canonical encoding of regeneration settings. | |
| std::string | CanonicalEncoding (algorithm::PostProcessingConfig const &c) |
| Canonical encoding of post-processing (classification) settings. | |
| std::string | CanonicalEncoding (algorithm::ZeroDimConfig const &c) |
| Canonical encoding of top-level zero-dim solve settings. | |
| std::string | CanonicalEncoding (algorithm::MetaConfig const &c) |
| Canonical encoding of the algorithm (track-type) selection. | |
| std::string | CanonicalEncoding (algorithm::classic::EndgameChoiceConfig const &c) |
| Canonical encoding of the endgame selection. | |
| template<typename ConfigT> | |
| detail::Digest256 | ConfigDigest (ConfigT const &config) |
| The persistent digest of one configuration: SHA-256 over its versioned canonical encoding. | |
| template<typename... ConfigTs> | |
| detail::Digest256 | SettingsDigest (ConfigTs const &... configs) |
| One digest for a solver's FULL settings: the versioned concatenation of several configs' canonical encodings, in the order given. | |
| std::string | ConfigTextAsJson (std::string const &canonical_text, std::string const &digest_hex) |
| Render one or more canonical config encodings as pretty JSON, for archiving in a structured output directory. | |
| DrawStream & | ThreadDrawStream () |
| This thread's pinned draw stream — the source of every identity-relevant random draw in bertini2. | |
| double | DrawUnitDouble () |
| A draw from this thread's pinned stream, uniform on [0,1) (exactly 53 bits). | |
| double | DrawSymmetricDouble () |
| A draw from this thread's pinned stream, uniform on [-1,1]. | |
| std::string | EncodingOfSystemDefinition (std::string const &definition_json) |
| The canonical encoding text inside an archived system definition document. | |
| std::shared_ptr< const System > | LoadSystem (OutputDirectory const &directory, std::string const &digest_hex) |
| Load the system archived under digest_hex in directory. | |
| std::string | SystemEncodingAsJson (std::string const &encoding_text, std::string const &digest_hex, boost::json::object const &parts) |
| The archived form of a system definition: a machine-parseable JSON document {"schema", "digest", "system", "encoding"} – one json.load away, like the config definitions. | |
| std::string | TimeStampNow () |
| The record timestamp, now: YYYY-MM-DD HH:MM local time – the one clock format every record kind uses (run headers, declarations, recall events). | |
| std::optional< std::string > | AmbientRecordsPath () |
| Resolve the ambient records directory from the environment – the ONE place the BERTINI_RECORDS_DIR semantics live (the CLI and every solver's ambient attach use it). | |
| std::string | ProducerVersion () |
| This build's package version (e.g. "3.0.0.dev7", from the VERSION file). | |
| std::string | ProducerCommit () |
| The git commit this build came from ("<sha>", "<sha>-dirty", or "unknown" for builds outside a git checkout, e.g. | |
| boost::json::object | ProducerInfo () |
| The producer object recorded in every run header. | |
| std::string | ExactDoubleText (double v) |
| A double as full-round-trip decimal text (%.17g: bit-exact per IEEE-754). | |
| double | DoubleFromText (std::string const &s) |
| Parse a double written by ExactDoubleText (bit-exact round trip). | |
| std::string | EncodeRealScalar (double v) |
| Encode one real scalar as text: doubles via %.17g; real_mp at full stored precision. | |
| std::string | EncodeRealScalar (real_mp const &v) |
| Encode one multiprecision real scalar as full-precision decimal text. | |
| boost::json::array | EncodeComplexScalar (complex_dbl const &z) |
| Encode one complex value as ["re", "im", precision] (precision in digits). | |
| boost::json::array | EncodeComplexScalar (complex_mp const &z) |
| Encode one multiprecision complex value as ["re", "im", precision]. | |
| template<typename ComplexT> | |
| ComplexT | DecodeComplexScalar (boost::json::array const &triple) |
| Decode a complex value written by EncodeComplexScalar, at its recorded precision. | |
| template<> | |
| complex_dbl | DecodeComplexScalar< complex_dbl > (boost::json::array const &triple) |
| Decode a double-precision complex value. | |
| template<> | |
| complex_mp | DecodeComplexScalar< complex_mp > (boost::json::array const &triple) |
| Decode a multiprecision complex value at its recorded precision. | |
| template<typename ComplexT> | |
| boost::json::array | EncodePoint (Vec< ComplexT > const &point) |
| Encode a point (vector of complex coordinates) as an array of scalar triples. | |
| template<typename ComplexT> | |
| Vec< ComplexT > | DecodePoint (boost::json::array const &coords) |
| Decode a point written by EncodePoint. | |
| std::string | CanonicalName (SuccessCode code) |
| The fixed canonical name of a tracker/endgame SuccessCode, for the records. | |
| std::string | CoarsePathStatus (SuccessCode code) |
| The coarse outcome of a path, from its endgame verdict: "success", "diverged" (the path went to infinity – a clean GoingToInfinity verdict, or the security check TRUNCATING it near infinity), or "failed" (the tracker gave up). | |
| template<typename ComplexT> | |
| boost::json::object | EncodeFullPathResult (parallel::FullPathResult< ComplexT > const &r) |
| Serialize one whole-path result as a b2rec/1 track record body. | |
| template<typename ComplexT> | |
| parallel::FullPathResult< ComplexT > | DecodeFullPathResult (boost::json::object const &rec, std::size_t path_index) |
| Reconstruct a whole-path result from a track record (the recall half). | |
Variables | |
| constexpr char | ConfigEncodingVersion [] = "b2cfgenc/4" |
| The version tag baked into every config digest; bump on any encoding change. | |
| constexpr char | RandomDerivationVersion [] = "b2rand/1" |
| The version tag of the draw-derivation scheme; bump on any algorithm change. | |
| constexpr char | RecordSchemaVersion [] = "b2rec/1" |
| The record-format version tag written on run headers; see docs/records/b2rec-1.md. | |
| std::optional< std::string > bertini::records::AmbientRecordsPath | ( | ) |
Resolve the ambient records directory from the environment – the ONE place the BERTINI_RECORDS_DIR semantics live (the CLI and every solver's ambient attach use it).
Records are ON BY DEFAULT for every face of bertini2 (ADR-0047): when the variable is unset, the resolution is bertini_output. A non-empty value chooses the directory. The OFF switch is the value none – or the empty string, which only exists on POSIX (Windows cannot represent an empty environment value: assigning one deletes the variable, which would silently flip "off" back to the default).
| std::string bertini::records::CanonicalEncoding | ( | algorithm::AutoRetrackConfig const & | c | ) |
Canonical encoding of crossed-path auto-retrack settings.
| std::string bertini::records::CanonicalEncoding | ( | algorithm::classic::EndgameChoiceConfig const & | c | ) |
Canonical encoding of the endgame selection.
| std::string bertini::records::CanonicalEncoding | ( | algorithm::MetaConfig const & | c | ) |
Canonical encoding of the algorithm (track-type) selection.
| std::string bertini::records::CanonicalEncoding | ( | algorithm::MidPathConfig const & | c | ) |
Canonical encoding of midpath (path-crossing check) settings.
| std::string bertini::records::CanonicalEncoding | ( | algorithm::PostProcessingConfig const & | c | ) |
Canonical encoding of post-processing (classification) settings.
| std::string bertini::records::CanonicalEncoding | ( | algorithm::RegenerationConfig const & | c | ) |
Canonical encoding of regeneration settings.
| std::string bertini::records::CanonicalEncoding | ( | algorithm::SharpeningConfig const & | c | ) |
Canonical encoding of solution-sharpening settings.
| std::string bertini::records::CanonicalEncoding | ( | algorithm::TolerancesConfig const & | c | ) |
Canonical encoding of Newton/path tolerances.
| std::string bertini::records::CanonicalEncoding | ( | algorithm::ZeroDimConfig const & | c | ) |
Canonical encoding of top-level zero-dim solve settings.
Excludes num_threads and recall (transient: they must not change identity).
| std::string bertini::records::CanonicalEncoding | ( | endgame::CauchyConfig const & | c | ) |
Canonical encoding of Cauchy-endgame settings.
| std::string bertini::records::CanonicalEncoding | ( | endgame::EndgameConfig const & | c | ) |
Canonical encoding of common endgame settings.
| std::string bertini::records::CanonicalEncoding | ( | endgame::PowerSeriesConfig const & | c | ) |
Canonical encoding of power-series-endgame settings.
| std::string bertini::records::CanonicalEncoding | ( | endgame::SecurityConfig const & | c | ) |
Canonical encoding of endgame security (divergence-bailout) settings.
| std::string bertini::records::CanonicalEncoding | ( | endgame::TrackBackConfig const & | c | ) |
Canonical encoding of track-back endgame settings.
| std::string bertini::records::CanonicalEncoding | ( | tracking::AdaptiveMultiplePrecisionConfig const & | c | ) |
Canonical encoding of adaptive-multiple-precision settings.
| std::string bertini::records::CanonicalEncoding | ( | tracking::FixedPrecisionConfig const & | c | ) |
Canonical encoding of fixed-precision settings.
| std::string bertini::records::CanonicalEncoding | ( | tracking::NewtonConfig const & | c | ) |
Canonical encoding of Newton-corrector settings.
| std::string bertini::records::CanonicalEncoding | ( | tracking::Predictor | p | ) |
Canonical encoding of a predictor choice (as a one-field pseudo-config).
| std::string bertini::records::CanonicalEncoding | ( | tracking::SteppingConfig const & | c | ) |
Canonical encoding of stepping settings.
| std::string bertini::records::CanonicalEncoding | ( | tracking::TrackerConfig const & | c | ) |
Canonical encoding of the tracker's own settings (predictor and its two thresholds).
| c | The config to encode. |
| std::string bertini::records::CanonicalName | ( | algorithm::classic::AlgoChoice | a | ) |
The fixed canonical name of an algorithm (track-type) choice.
| std::string bertini::records::CanonicalName | ( | algorithm::classic::EndgameChoice | e | ) |
The fixed canonical name of an endgame choice.
|
inline |
The fixed canonical name of a tracker/endgame SuccessCode, for the records.
Integer enum values could renumber across versions; the NAME is the durable, read-without-bertini rendering, recorded beside the integer in every track record.
| code | The success code to name. |
| std::string bertini::records::CanonicalName | ( | tracking::Predictor | p | ) |
The fixed canonical name of a predictor choice (never its numeric value).
|
inline |
The coarse outcome of a path, from its endgame verdict: "success", "diverged" (the path went to infinity – a clean GoingToInfinity verdict, or the security check TRUNCATING it near infinity), or "failed" (the tracker gave up).
A diverged path is an ANSWER, not a failure: the solver classified it, deliberately. Audits of a run should see success / diverged / failed as three distinct populations (the same bucketing SummarizeSolve uses).
| code | The endgame success code of the path. |
| detail::Digest256 bertini::records::ConfigDigest | ( | ConfigT const & | config | ) |
The persistent digest of one configuration: SHA-256 over its versioned canonical encoding.
| ConfigT | Any type with a CanonicalEncoding overload above. |
| config | The configuration to digest. |
| std::string bertini::records::ConfigTextAsJson | ( | std::string const & | canonical_text, |
| std::string const & | digest_hex ) |
Render one or more canonical config encodings as pretty JSON, for archiving in a structured output directory.
The DIGEST contract stays on the canonical text (b2cfgenc/<n>); this JSON view is derived from it mechanically – exact values preserved as strings – because JSON is the format humans and tools in the directory already speak.
| canonical_text | Newline-separated canonical encodings, first line the version tag. |
| digest_hex | The settings digest these encodings produce (recorded alongside). |
| ComplexT bertini::records::DecodeComplexScalar | ( | boost::json::array const & | triple | ) |
Decode a complex value written by EncodeComplexScalar, at its recorded precision.
|
inline |
Decode a double-precision complex value.
|
inline |
Decode a multiprecision complex value at its recorded precision.
| parallel::FullPathResult< ComplexT > bertini::records::DecodeFullPathResult | ( | boost::json::object const & | rec, |
| std::size_t | path_index ) |
Reconstruct a whole-path result from a track record (the recall half).
| Vec< ComplexT > bertini::records::DecodePoint | ( | boost::json::array const & | coords | ) |
Decode a point written by EncodePoint.
|
inline |
Parse a double written by ExactDoubleText (bit-exact round trip).
| double bertini::records::DrawSymmetricDouble | ( | ) |
A draw from this thread's pinned stream, uniform on [-1,1].
| double bertini::records::DrawUnitDouble | ( | ) |
A draw from this thread's pinned stream, uniform on [0,1) (exactly 53 bits).
|
inline |
Encode one complex value as ["re", "im", precision] (precision in digits).
|
inline |
Encode one multiprecision complex value as ["re", "im", precision].
| boost::json::object bertini::records::EncodeFullPathResult | ( | parallel::FullPathResult< ComplexT > const & | r | ) |
Serialize one whole-path result as a b2rec/1 track record body.
Field names mirror parallel::FullPathResult. SuccessCodes are recorded as integers (their values are part of the b2rec contract) AND by canonical name (the durable, read-without-bertini rendering). The caller adds "kind"/"run"/"index"/"status"/"start".
| boost::json::array bertini::records::EncodePoint | ( | Vec< ComplexT > const & | point | ) |
Encode a point (vector of complex coordinates) as an array of scalar triples.
|
inline |
Encode one real scalar as text: doubles via %.17g; real_mp at full stored precision.
|
inline |
Encode one multiprecision real scalar as full-precision decimal text.
| std::string bertini::records::EncodingOfSystemDefinition | ( | std::string const & | definition_json | ) |
The canonical encoding text inside an archived system definition document.
| definition_json | The document as PutDefinition stored it (the output of SystemEncodingAsJson): a JSON object with an encoding string member. |
Throws std::runtime_error if the document is not JSON or has no encoding string.
|
inline |
A double as full-round-trip decimal text (%.17g: bit-exact per IEEE-754).
| std::shared_ptr< const System > bertini::records::LoadSystem | ( | OutputDirectory const & | directory, |
| std::string const & | digest_hex ) |
Load the system archived under digest_hex in directory.
| directory | The records directory holding the systems/ definition. |
| digest_hex | The system's content digest, as the run header and the definition filename carry it (64 lowercase hex characters). |
Throws std::runtime_error if no definition has that id, if the encoding cannot be read (a version this build does not read, other canonicalization settings, damage), or if the rebuilt system's digest differs from digest_hex – the document was altered, or the encoding no longer means what it meant when it was written.
| std::string bertini::records::ProducerCommit | ( | ) |
The git commit this build came from ("<sha>", "<sha>-dirty", or "unknown" for builds outside a git checkout, e.g.
from a source tarball).
| boost::json::object bertini::records::ProducerInfo | ( | ) |
The producer object recorded in every run header.
| std::string bertini::records::ProducerVersion | ( | ) |
This build's package version (e.g. "3.0.0.dev7", from the VERSION file).
| detail::Digest256 bertini::records::SettingsDigest | ( | ConfigTs const &... | configs | ) |
One digest for a solver's FULL settings: the versioned concatenation of several configs' canonical encodings, in the order given.
Order matters and is part of the contract: a given solver kind should always compose its settings digest in one fixed order (document it at the call site).
| ConfigTs | Types each having a CanonicalEncoding overload. |
| configs | The configurations, in the solver's fixed order. |
| std::string bertini::records::SystemEncodingAsJson | ( | std::string const & | encoding_text, |
| std::string const & | digest_hex, | ||
| boost::json::object const & | parts ) |
The archived form of a system definition: a machine-parseable JSON document {"schema", "digest", "system", "encoding"} – one json.load away, like the config definitions.
The system value is the structured parts view (variable groups, path variable, functions, patches – see io::SystemPartsJson); the encoding value is the EXACT canonical encoding text (b2sysenc/<n>, the digest preimage, block structure preserved). Classic (Bertini 1) syntax appears nowhere: it is an input/compatibility format, not an output format. Verification of a wandering file: extract the encoding and hash it, e.g. jq -r .encoding <file> | sha256sum reproduces digest.
| encoding_text | The system's canonical encoding (System::CanonicalEncodingText()). |
| digest_hex | The system's content digest (64 lowercase hex characters). |
| parts | The structured parts view of the same system (presentation only). |
| DrawStream & bertini::records::ThreadDrawStream | ( | ) |
This thread's pinned draw stream — the source of every identity-relevant random draw in bertini2.
Reseeded alongside the legacy engine by SetGlobalSeed / ReseedThisThread (random.hpp), preserving the setup / per-path / worker stream separation.
| std::string bertini::records::TimeStampNow | ( | ) |
The record timestamp, now: YYYY-MM-DD HH:MM local time – the one clock format every record kind uses (run headers, declarations, recall events).
|
constexpr |
The version tag baked into every config digest; bump on any encoding change.
|
constexpr |
The version tag of the draw-derivation scheme; bump on any algorithm change.
|
constexpr |
The record-format version tag written on run headers; see docs/records/b2rec-1.md.
Bump on any change to record shapes or conventions.