Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
base_endgame.hpp
Go to the documentation of this file.
1//This file is part of Bertini 2.
2//
3//base_endgame.hpp is free software: you can redistribute it and/or modify
4//it under the terms of the GNU General Public License as published by
5//the Free Software Foundation, either version 3 of the License, or
6//(at your option) any later version.
7//
8//base_endgame.hpp is distributed in the hope that it will be useful,
9//but WITHOUT ANY WARRANTY; without even the implied warranty of
10//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11//GNU General Public License for more details.
12//
13//You should have received a copy of the GNU General Public License
14//along with base_endgame.hpp. If not, see <http://www.gnu.org/licenses/>.
15//
16// Copyright(C) Bertini2 Development Team
17//
18// See <http://www.gnu.org/licenses/> for a copy of the license,
19// as well as COPYING. Bertini2 is provided with permitted
20// additional terms in the b2/licenses/ directory.
21
22#ifndef BERTINI_BASE_ENDGAME_HPP
23#define BERTINI_BASE_ENDGAME_HPP
24
25#pragma once
33
34#include <iostream>
35#include <limits> // std::numeric_limits, for approximate_error_'s infinity sentinel
36#include <typeinfo>
37
38
40
42
44
46#include "bertini2/trackers/adaptive_precision_utilities.hpp" // tracking::adaptive::SetPrecision, for the shared container-migration helpers
50
51#include "bertini2/logging.hpp"
52
54
55
56namespace bertini{ namespace endgame {
57
58
86template<class FlavorT, class PrecT>
88 public detail::Configured< typename AlgoTraits<FlavorT>::NeededConfigs >,
89 public PrecT,
90 public virtual Observable
91{
92public:
93 using TrackerType = typename PrecT::TrackerType;
94
97
98 using EmitterType = FlavorT;
99
105
106protected:
107
109 using BRT = BaseRealT;
110
111
114 using ConfigsAsTuple = typename Configs::ToTuple;
115
116 // The list of arithmetic types this endgame may compute in. Sourced from the tracker, so it
117 // matches the tracker's own dual/single-slot tuple machinery exactly:
118 // AMP -> TypeList<complex_dbl, complex_mp> (hardware-double fast lane + mpfr authority)
119 // fixed dbl -> TypeList<complex_dbl>
120 // fixed mp -> TypeList<complex_mp>
121 // For AMP this makes every container (TupOfVec/TupleOfTimes/TupleOfSamps) dual-slot; the existing
122 // type-indexed std::get<...ComplexT...>(member) access then works for complex_dbl for free.
124 using TupOfVec = typename NeededTypes::ToTupleOfVec;
125 using TupOfReal = typename NeededTypes::ToTupleOfReal;
126 using TupleOfTimes = typename NeededTypes::template ToTupleOfCont<TimeCont>;
127 using TupleOfSamps = typename NeededTypes::template ToTupleOfCont<SampCont>;
128
129
130
131 // universal endgame state variables
134 mutable unsigned int cycle_number_ = 0;
140 mutable NumErrorT approximate_error_ = std::numeric_limits<NumErrorT>::infinity();
141
142 // The adaptive-numeric-type state (current_endgame_precision_, adaptive_numeric_type_active_) lives in
143 // the AMP precision policy, AMPEndgame -- the flavors reach it through this-> (it is a base via PrecT).
144
147
157
161
162
171 // Drawn per run, never lazily on first use: a lazy draw lands in whichever path first needs
172 // the probe, so the direction a path used, and the draws it consumed, would depend on the
173 // paths the same endgame ran before it, and on which thread ran them (#378, ADR-0071).
174 void RefreshCOverKProbe(unsigned size) const
175 {
176 c_over_k_probe_as_drawn_.resize(size);
177 for (unsigned ii = 0; ii < size; ++ii)
179 std::apply([](auto&... working){ (working.resize(0), ...); }, c_over_k_probe_);
180 }
181
182
195 template<typename ComplexT>
196 Vec<ComplexT> const& GetCOverKProbe(unsigned size, unsigned prec) const
197 {
198 using bertini::Precision;
199 if (static_cast<unsigned>(c_over_k_probe_as_drawn_.size()) != size)
200 RefreshCOverKProbe(size); // samples of another size than this run began with
201
202 auto& probe = std::get<Vec<ComplexT> >(c_over_k_probe_);
203 bool stale = static_cast<unsigned>(probe.size()) != size;
204 if constexpr (!std::is_same<ComplexT, complex_dbl>::value)
205 stale = stale || Precision(probe) != prec;
206 if (stale)
207 {
208 probe.resize(size);
209 for (unsigned ii = 0; ii < size; ++ii)
210 probe(ii) = ComplexT(c_over_k_probe_as_drawn_(ii));
211 if constexpr (!std::is_same<ComplexT, complex_dbl>::value)
212 Precision(probe, prec);
213 }
214 return probe;
215 }
216
217
218public:
219
236 template<typename ComplexT>
237 auto ComputeCOverK(SampCont<ComplexT> const& samples) const -> typename Eigen::NumTraits<ComplexT>::Real
238 {
239 using RealT = typename Eigen::NumTraits<ComplexT>::Real;
240 using std::abs;
241 using std::log;
242
243 assert(samples.size()>=3);
244 const Vec<ComplexT> & sample0 = samples[0];
245 const Vec<ComplexT> & sample1 = samples[1];
246 const Vec<ComplexT> & sample2 = samples[2];
247
248 const Vec<ComplexT> & rand_vector =
249 GetCOverKProbe<ComplexT>(static_cast<unsigned>(sample0.size()), Precision(sample0));
250
251 // //DO NOT USE Eigen .dot() it will do conjugate transpose which is not what we want.
252 // //Also, the .transpose*rand_vector returns an expression template that we do .norm of since abs is not available for that expression type.
253 RealT estimate = abs(log(abs((((sample2 - sample1).transpose()*rand_vector).template lpNorm<Eigen::Infinity>())/(((sample1 - sample0).transpose()*rand_vector).template lpNorm<Eigen::Infinity>()))));
254 estimate = abs(log(RealT(this->EndgameSettings().sample_factor)))/estimate;
255 if (estimate < 1)
256 return RealT(1);
257 else
258 return estimate;
259 }
260
261
275 template<typename T>
276 bool CheckForCOverKStabilization(std::deque<T> const& c_over_k_array) const
277 {
278 using RealT = typename Eigen::NumTraits<T>::Real;
279 using std::abs;
280
281 assert(c_over_k_array.size()>=this->EndgameSettings().num_needed_for_stabilization);
282 for(unsigned ii = 1; ii < this->EndgameSettings().num_needed_for_stabilization ; ++ii)
283 {
284 RealT a = abs(c_over_k_array[ii-1]);
285 RealT b = abs(c_over_k_array[ii]);
286
287 RealT divide = a;
288 if(a < b)
289 divide = a/b;
290 else
291 divide = b/a;
292
293 if(divide < this->EndgameSettings().minimum_for_c_over_k_stabilization)
294 return false;
295 }
296 return true;
297 }
298
299protected:
300
306 const FlavorT& AsFlavor() const
307 {
308 return dynamic_cast<const FlavorT&>(*this);
309 }
310
314 FlavorT& AsFlavor()
315 {
316 return dynamic_cast<FlavorT&>(*this);
317 }
318
319public:
320
322 void SetBoundaryTime(BCT const& t) { start_time_ = t; }
324 void SetTargetTime (BCT const& t) { target_time_ = t; }
326 BCT const& BoundaryTime() const { return start_time_; }
328 BCT const& TargetTime() const { return target_time_; }
329
338 SuccessCode Run(Vec<BCT> const& start_point)
339 {
340 using bertini::Precision;
341 // EVERY path enters here, so this is the per-run boundary an observer needs to tell
342 // one path's samples from the next -- without it, a collector attached to a solver's
343 // endgame concatenates every path into one undifferentiated heap. Initializing was
344 // declared, and handled by GoryDetailLogger, but emitted by nothing.
345 NotifyObservers(Initializing<EmitterType>(this->AsFlavor()));
346 // a run's c/k direction is drawn here, at its start, never inherited from an earlier run
347 RefreshCOverKProbe(static_cast<unsigned>(start_point.size()));
348 auto prec = Precision(start_point);
349 BCT t = start_time_; Precision(t, prec);
350 BCT t0 = target_time_; Precision(t0, prec);
351 // Fixed precision runs today's straight-line RunImpl<BCT> verbatim (untouched). Adaptive
352 // precision takes the separate double-first driver, RunImplAMP, which lives in the flavor.
353 // RunImplAMP is a member template (template<typename=void>) so the explicit fixed-precision
354 // class instantiations never force-compile it -- hence the .template disambiguator here.
356 return this->AsFlavor().template RunImplAMP<>(t, start_point, t0);
357 else
358 return this->AsFlavor().RunImpl(t, start_point, t0);
359 }
360
361
374 template<typename ComplexT>
375 void EmitComputedSample(Vec<ComplexT> const& sample, ComplexT const& time)
376 {
377 if constexpr (std::is_same<ComplexT, BCT>::value)
379 else if (this->HasObservers())
380 {
381 Vec<BCT> ev_pt(sample.size());
382 for (Eigen::Index i = 0; i < sample.size(); ++i) ev_pt(i) = BCT(sample(i));
383 BCT ev_t(time);
385 }
386 }
387
389 template<typename ComplexT>
391 {
392 for (size_t ii=0; ii<samples.size(); ++ii)
393 {
394 auto refine_success = this->RefineSample(samples[ii], samples[ii], times[ii],
395 this->FinalTolerance() * this->EndgameSettings().sample_point_refinement_factor,
396 this->EndgameSettings().max_num_refinements);
397 if (refine_success != SuccessCode::Success)
398 {
399 // BOOST_LOG_TRIVIAL(severity_level::trace) << "refining failed, code " << int(refine_success);
400 return refine_success;
401 }
402 NotifyObservers(SampleRefined<EmitterType>(AsFlavor()));
403 }
404
405 if constexpr (tracking::TrackerTraits<TrackerType>::IsAdaptivePrec) // known at compile time
406 {
407 auto max_precision = this->EnsureAtUniformPrecision(times, samples);
408 }
409
411 }
412
413
421 template<typename ComplexT>
422 SuccessCode RefineSample(Vec<ComplexT> & result, Vec<ComplexT> const& current_sample, ComplexT const& current_time, NumErrorT tol, unsigned max_iterations) const
423 {
424 return this->RefineSampleImpl(result, current_sample, current_time, tol, max_iterations);
425 }
426
427
445 template<typename ComplexT>
446 SuccessCode EndgameTrackPath(Vec<ComplexT> & result, ComplexT const& start_time, ComplexT const& end_time, Vec<ComplexT> const& start_point) const
447 {
448 if constexpr (std::is_same<ComplexT, BCT>::value)
449 {
450 return this->GetTracker().TrackPath(result, start_time, end_time, start_point);
451 }
452 else
453 {
454 using bertini::Precision;
455 Vec<BCT> mp_start(start_point.size());
456 for (Eigen::Index i = 0; i < start_point.size(); ++i) mp_start(i) = BCT(start_point(i));
457 Precision(mp_start, DoublePrecision());
458
459 BCT mp_t0(start_time); Precision(mp_t0, DoublePrecision());
460 BCT mp_t1(end_time); Precision(mp_t1, DoublePrecision());
461
462 Vec<BCT> mp_result(start_point.size());
463 auto code = this->GetTracker().TrackPath(mp_result, mp_t0, mp_t1, mp_start);
464 if (code != SuccessCode::Success)
465 return code;
466
467 result.resize(mp_result.size());
468 for (Eigen::Index i = 0; i < mp_result.size(); ++i) result(i) = complex_dbl(mp_result(i));
469 return code;
470 }
471 }
472
473
474 // EscalateAndMigrate bridges the AMP precision policy (NextEscalatedPrecision and the Cross* helpers,
475 // all in AMPEndgame) with the flavor's container list (its MigrateContainersToPrecision). It lives
476 // here, not in AMPEndgame, because it needs AsFlavor(), which the precision-policy base lacks. Member
477 // template so the explicit fixed-precision class instantiations never force-compile it. Raises the
478 // working precision and migrates every durable container up to it; bounded by a runaway guard.
480 template<typename Dummy = void>
482 {
483 if (guard > 64)
485 unsigned newprec = this->NextEscalatedPrecision();
486 this->AsFlavor().template MigrateContainersToPrecision<>(newprec);
487 this->current_endgame_precision_ = newprec;
488 SetThreadPrecision(newprec);
490 }
491
492
493 // note: a ChangePrecision(unsigned) lived here until 2026-06-12; it called
494 // flavor-level ChangePrecision methods that have never existed, so it could
495 // not compile -- it just was never instantiated until explicit template
496 // instantiation (ADR-0014) forced every member. zero callers; deleted.
497 // precision changes go through the PrecT policy (see prec_base.hpp).
498
499
503 inline
504 const auto & EndgameSettings() const
505 {
506 return Configured::template Get<EndgameConfig>();
507 }
508
510 inline
511 const auto & SecuritySettings() const
512 {
513 return this->template Get<SecurityConfig>();
514 }
515
520 template<typename RealT>
521 bool BeyondSecurityMaxNorm(RealT const& norm) const
522 {
523 using std::isnan;
524 return isnan(norm) || norm > static_cast<RealT>(this->SecuritySettings().max_norm);
525 }
526
528 explicit EndgameBase(TrackerType const& tr, const ConfigsAsTuple& settings ) :
530 {}
531
532
534 template< typename... Ts >
535 explicit
536 EndgameBase(TrackerType const& tr, const Ts&... ts ) : EndgameBase(tr, Configs::Unpermute( ts... ) )
537 {}
538
539
541 inline unsigned CycleNumber() const { return cycle_number_;}
543 inline void CycleNumber(unsigned c) { cycle_number_ = c;}
545 inline void IncrementCycleNumber(unsigned inc) { cycle_number_ += inc;}
546
547
551 inline
552 const auto& FinalTolerance() const
553 {
554 return this->template Get<EndgameConfig>().final_tolerance;
555 }
556
557
558
562 inline
564 {
565 // pre-ETI this member was never instantiated, hiding two defects: Get<>
566 // returns const& (assignment through it cannot compile), and the old
567 // BRT parameter type didn't match final_tolerance's storage (NumErrorT)
568 auto settings = this->template Get<EndgameConfig>();
569 settings.final_tolerance = ft;
570 this->Set(settings);
571 }
572
573
574
575
579 template<typename ComplexT>
580 inline
582 {
584 }
585
589 template<typename ComplexT>
590 inline
592 {
594 }
595
599 inline
601 {
602 return approximate_error_;
603 }
604
605
609 inline
610 const BCT& LatestTime() const
611 {
612 return AsFlavor().LatestTimeImpl();
613 }
614
615 // /**
616 // \brief Get the system being tracked on, which is referred to by the tracker.
617 // */
618 // inline
619 // const System& GetSystem() const
620 // {
621 // return GetTracker().GetSystem();
622 // }
623
624
655 template<typename ComplexT>
656 SuccessCode ComputeInitialSamples(const ComplexT & start_time,const ComplexT & target_time, const Vec<ComplexT> & x_endgame_start, TimeCont<ComplexT> & times, SampCont<ComplexT> & samples) // passed by reference to allow times to be filled as well.
657 {
658 using RealT = typename Eigen::NumTraits<ComplexT>::Real;
659 assert(this->template Get<EndgameConfig>().num_sample_points>0 && "number of sample points must be positive");
660
662 {
663 assert(Precision(start_time)==Precision(x_endgame_start) && "Computing initial samples requires input time and space with uniform precision");
664 }
665
666 samples.clear();
667 times.clear();
668
669 samples.push_back(x_endgame_start);
670 times.push_back(start_time);
671 // The endgame's own input point, AT the boundary time: the coarsest sample of
672 // the approach, and the widest |t| any consumer will ever see. Without these
673 // the sequence starts at boundary * sample_factor^(num_sample_points-1) --
674 // measured, 0.1 -> 1.25e-2, throwing away most of the span before anyone
675 // looks at it.
676 EmitComputedSample(samples[0], times[0]);
677
678 auto num_vars = this->GetSystem().NumVariables();
679 //start at 1, because the input point is the 0th element.
680 for(unsigned ii=1; ii < this->template Get<EndgameConfig>().num_sample_points; ++ii)
681 {
682 times.emplace_back((times[ii-1] + target_time) * RealT(this->template Get<EndgameConfig>().sample_factor)); // next time is a point between the previous time and target time.
683 samples.emplace_back(Vec<ComplexT>(num_vars)); // sample_factor gives us some point between the two, usually the midpoint.
684
685 auto tracking_success = this->EndgameTrackPath(samples[ii],times[ii-1],times[ii],samples[ii-1]);
686 this->EnsureAtPrecision(times[ii],Precision(samples[ii]));
687
688 if (tracking_success!=SuccessCode::Success)
689 return tracking_success;
690
691 EmitComputedSample(samples[ii], times[ii]);
692 }
693
695 }
696
697 virtual ~EndgameBase() = default;
698};
699
700} }// end namespaces bertini
701
702
703#endif
Functions for dealing with precisions of objects, particularly in the context of adaptive precision.
bool HasObservers() const
Whether anyone is currently observing (conservative).
Definition observable.hpp:204
void NotifyObservers(AnyEvent const &e) const
Sends an event to observers that subscribed to its exact dynamic type, then to all catch-all (untyped...
Definition observable.hpp:185
A new sample point on the path was computed, adding one point to the sequence of the endgame's approa...
Definition events.hpp:118
void SetFinalTolerance(NumErrorT const &ft)
Setter for the final tolerance.
Definition base_endgame.hpp:563
SuccessCode Run(Vec< BCT > const &start_point)
Run the endgame from the stored boundary time to the stored target time.
Definition base_endgame.hpp:338
EndgameBase(TrackerType const &tr, const Ts &... ts)
Construct the endgame for a tracker, with configs given in any order.
Definition base_endgame.hpp:536
const Vec< ComplexT > & FinalApproximation() const
Get the most-recent approximation.
Definition base_endgame.hpp:581
bool BeyondSecurityMaxNorm(RealT const &norm) const
Definition base_endgame.hpp:521
SuccessCode EndgameTrackPath(Vec< ComplexT > &result, ComplexT const &start_time, ComplexT const &end_time, Vec< ComplexT > const &start_point) const
Track through the tracker, adapting at the numeric-type boundary.
Definition base_endgame.hpp:446
void CycleNumber(unsigned c)
Set the cycle number.
Definition base_endgame.hpp:543
void SetBoundaryTime(BCT const &t)
Set the endgame boundary (start) time.
Definition base_endgame.hpp:322
typename PrecT::TrackerType TrackerType
The path-tracker type.
Definition base_endgame.hpp:93
auto ComputeCOverK(SampCont< ComplexT > const &samples) const -> typename Eigen::NumTraits< ComplexT >::Real
An estimate of c/k from the three most recent geometric samples.
Definition base_endgame.hpp:237
bool CheckForCOverKStabilization(std::deque< T > const &c_over_k_array) const
Have the last few c/k estimates settled to within the user's threshold?
Definition base_endgame.hpp:276
NumErrorT approximate_error_
Definition base_endgame.hpp:140
const FlavorT & AsFlavor() const
convert the base endgame into the derived type.
Definition base_endgame.hpp:306
void EmitComputedSample(Vec< ComplexT > const &sample, ComplexT const &time)
Announce a completed sample point on the path, as a ComputedSamplePoint.
Definition base_endgame.hpp:375
const BCT & LatestTime() const
Get the latest time at which a point on the path was computed.
Definition base_endgame.hpp:610
unsigned CycleNumber() const
Definition base_endgame.hpp:541
NumErrorT ApproximateError() const
Get the most recent accuracy estimate.
Definition base_endgame.hpp:600
typename NeededTypes::template ToTupleOfCont< SampCont > TupleOfSamps
A tuple of sample containers, one per numeric type.
Definition base_endgame.hpp:127
const auto & SecuritySettings() const
Definition base_endgame.hpp:511
SuccessCode ComputeInitialSamples(const ComplexT &start_time, const ComplexT &target_time, const Vec< ComplexT > &x_endgame_start, TimeCont< ComplexT > &times, SampCont< ComplexT > &samples)
Get the system being tracked on, which is referred to by the tracker.
Definition base_endgame.hpp:656
FlavorT & AsFlavor()
Non-const version of AsFlavor.
Definition base_endgame.hpp:314
void SetTargetTime(BCT const &t)
Set the final target time.
Definition base_endgame.hpp:324
Vec< BCT > previous_approximation_
Definition base_endgame.hpp:133
typename Configs::ToTuple ConfigsAsTuple
The configuration structs as a tuple.
Definition base_endgame.hpp:114
Vec< ComplexT > const & GetCOverKProbe(unsigned size, unsigned prec) const
The fixed random direction the c/k estimate is projected along.
Definition base_endgame.hpp:196
detail::Configured< typename AlgoTraits< FlavorT >::NeededConfigs > Configured
The Configured base type.
Definition base_endgame.hpp:112
void IncrementCycleNumber(unsigned inc)
Increase the cycle number by the given increment.
Definition base_endgame.hpp:545
BaseRealT BRT
The real number type.
Definition base_endgame.hpp:109
BaseComplexT BCT
The complex number type.
Definition base_endgame.hpp:108
detail::Configured< typename AlgoTraits< FlavorT >::NeededConfigs > Config
The configuration bundle this endgame reads, public so that generic machinery which works in terms of...
Definition base_endgame.hpp:104
TupOfVec c_over_k_probe_
Definition base_endgame.hpp:160
virtual ~EndgameBase()=default
SuccessCode EscalateAndMigrate(unsigned guard)
Raise the endgame to the next precision and migrate the containers' complex_dbl slot up to complex_mp...
Definition base_endgame.hpp:481
SuccessCode RefineSample(Vec< ComplexT > &result, Vec< ComplexT > const &current_sample, ComplexT const &current_time, NumErrorT tol, unsigned max_iterations) const
A function passed off to the precision-specific endgame part.
Definition base_endgame.hpp:422
EndgameBase(TrackerType const &tr, const ConfigsAsTuple &settings)
Construct the endgame for a tracker, with its configuration as a tuple.
Definition base_endgame.hpp:528
SuccessCode RefineAllSamples(SampCont< ComplexT > &samples, TimeCont< ComplexT > &times)
Refine every sample point to the endgame's refinement tolerance.
Definition base_endgame.hpp:390
BCT const & TargetTime() const
Definition base_endgame.hpp:328
BCT const & BoundaryTime() const
Definition base_endgame.hpp:326
typename AlgoTraits< FlavorT >::NeededConfigs Configs
The configuration bundle (Configured base).
Definition base_endgame.hpp:113
typename tracking::TrackerTraits< TrackerType >::BaseComplexT BaseComplexT
The complex number type.
Definition base_endgame.hpp:95
Vec< BCT > final_approximation_
Definition base_endgame.hpp:132
typename NeededTypes::template ToTupleOfCont< TimeCont > TupleOfTimes
A tuple of time containers, one per numeric type.
Definition base_endgame.hpp:126
const auto & EndgameSettings() const
This function is inferior to the templated Get<ConfigT> function provided.
Definition base_endgame.hpp:504
typename NeededTypes::ToTupleOfVec TupOfVec
A tuple of vector containers, one per numeric type.
Definition base_endgame.hpp:124
void RefreshCOverKProbe(unsigned size) const
Draw the c/k probe direction for a run.
Definition base_endgame.hpp:174
const auto & FinalTolerance() const
Get the final tolerance to which we are tracking the solution.
Definition base_endgame.hpp:552
const Vec< ComplexT > & PreviousApproximation() const
Get the second-most-recent approximation.
Definition base_endgame.hpp:591
typename NeededTypes::ToTupleOfReal TupOfReal
A tuple of real values, one per numeric type.
Definition base_endgame.hpp:125
unsigned int cycle_number_
Definition base_endgame.hpp:134
typename tracking::TrackerTraits< TrackerType >::NeededTypes NeededTypes
Arithmetic types this endgame may compute in (sourced from the tracker).
Definition base_endgame.hpp:123
typename tracking::TrackerTraits< TrackerType >::BaseRealT BaseRealT
The real number type.
Definition base_endgame.hpp:96
FlavorT EmitterType
The event-emitter type.
Definition base_endgame.hpp:98
Vec< complex_dbl > c_over_k_probe_as_drawn_
Definition base_endgame.hpp:156
A common base type for various precision types, fixed and adaptive.
Definition prec_base.hpp:40
Contains the detail/configured helper type, for templated getting/setting/storage of config structs.
Contains helper templates, based on and refined from SO post https://stackoverflow....
Configs and settings for endgames.
Contains the endgames/events base types.
Contains interpolation and extrapolation functions used in the endgames for estimating singular (and ...
Logging in Bertini using Boost.Log.
The main multiprecision complex number type.
Definition endgames.hpp:44
Definition configIni_parse.hpp:78
Definition algorithm_builder.hpp:36
bool isnan(std::complex< double > const &z)
an overload of isnan, for std::complex<double>
Definition double_extensions.hpp:63
constexpr unsigned DoublePrecision()
The number of digits considered "double precision" (16).
Definition num_traits.hpp:152
std::complex< double > complex_dbl
The double-precision complex number type.
Definition double_extensions.hpp:47
Eigen::Matrix< NumT, Eigen::Dynamic, 1 > Vec
A dynamically-sized column vector of NumT.
Definition eigen_extensions.hpp:296
std::deque< Vec< T > > SampCont
Definition config.hpp:33
void SetThreadPrecision(unsigned prec)
Set the precision (digits) for the current thread only (does not touch the global default).
Definition mpfr_complex.hpp:176
double NumErrorT
The numeric type used to hold error/tolerance magnitudes throughout Bertini2 – tracking tolerances,...
Definition num_traits.hpp:48
std::deque< T > TimeCont
Definition config.hpp:34
SuccessCode
Definition config.hpp:42
@ Success
Definition config.hpp:51
@ HigherPrecisionNecessary
Definition config.hpp:52
unsigned Precision(Eigen::MatrixBase< Derived > const &v)
Get the precision of an Eigen object.
Definition eigen_extensions.hpp:339
std::tuple< const UnpermutedT &... > Unpermute(const PermutedPresentT &... present_permuted_args)
Reorder a set of present arguments into the declared UnpermutedT order, default-constructing any abse...
Definition enable_permuted_arguments.hpp:117
complex_dbl RandomUnit< complex_dbl >()
Get a random double-precision complex number of unit modulus.
Definition num_traits.hpp:241
This templated struct allows one to provide a variable typelist of config structs (or anything else f...
Definition configured.hpp:83
const T & Get() const
Definition configured.hpp:94
void Set(T const &t)
Definition configured.hpp:101
Definition config.hpp:176
Trait lookup mapping a tracker type to its numeric types, event-emitter type, precision config,...
Definition config.hpp:387
Provides the bertini::System class.
Configs and settings for tracking.