Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
user_homotopy.hpp
Go to the documentation of this file.
1//This file is part of Bertini 2.
2//
3//bertini2/blackbox/switches_zerodim.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//bertini2/blackbox/switches_zerodim.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 bertini2/blackbox/switches_zerodim.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// silviana amethyst, university of wisconsin-eau claire
23
29
30
31
32#pragma once
33
34
35#include "bertini2/system.hpp"
37#include "bertini2/endgames.hpp"
38
40#include "bertini2/blackbox/switches_zerodim.hpp" // ZeroDimRT
41
42
43namespace bertini{
44namespace blackbox{
45
46
47// User homotopies use the RefToGiven policy (the user owns target/start/homotopy), so they
48// get their own tracker/endgame dispatch chain -- distinct from the generic ZeroDimSpecify*
49// ladder, which always clones. ts... = (target, start_system, homotopy).
50
51template <typename TrackerType, typename EndgameType, typename ... ConstTs>
52std::unique_ptr<algorithm::AnyZeroDim> UserHomSpecifyComplete(ConstTs const& ...ts)
53{
54 return std::make_unique<
56 >(ts...);
57}
58
59template <typename TrackerType, typename ... ConstTs>
60std::unique_ptr<algorithm::AnyZeroDim> UserHomSpecifyEndgame(ZeroDimRT const& rt, ConstTs const& ...ts)
61{
62 switch (rt.endgame)
63 {
68 }
69 throw std::runtime_error("unrecognized endgame type in UserHomSpecifyEndgame");
70}
71
72template <typename ... ConstTs>
73std::unique_ptr<algorithm::AnyZeroDim> UserHomSpecifyTracker(ZeroDimRT const& rt, ConstTs const& ...ts)
74{
75 switch (rt.tracker)
76 {
83 }
84 throw std::runtime_error("unrecognized tracker type in UserHomSpecifyTracker");
85}
86
87template <typename ... ConstTs>
88std::unique_ptr<algorithm::AnyZeroDim> MakeUserHom(ZeroDimRT const& rt, ConstTs const& ...ts)
89{
90 return UserHomSpecifyTracker(rt, ts...);
91}
92
93
94} //ns blackbox
95} //ns bertini
Configs for the blackbox whatnot.
Collects the various header files which define the Bertini2 endgames.
@ FixedDouble
Definition config.hpp:40
@ Adaptive
Definition config.hpp:40
@ FixedMultiple
Definition config.hpp:40
@ Cauchy
Definition config.hpp:42
@ PowerSeries
Definition config.hpp:42
Definition algorithm_builder.hpp:37
std::unique_ptr< algorithm::AnyZeroDim > MakeUserHom(ZeroDimRT const &rt, ConstTs const &...ts)
Definition user_homotopy.hpp:88
std::unique_ptr< algorithm::AnyZeroDim > UserHomSpecifyEndgame(ZeroDimRT const &rt, ConstTs const &...ts)
Definition user_homotopy.hpp:60
std::unique_ptr< algorithm::AnyZeroDim > UserHomSpecifyTracker(ZeroDimRT const &rt, ConstTs const &...ts)
Definition user_homotopy.hpp:73
std::unique_ptr< algorithm::AnyZeroDim > UserHomSpecifyComplete(ConstTs const &...ts)
Definition user_homotopy.hpp:52
Definition algorithm_builder.hpp:36
The continuation primitive: given a homotopy + a source of start points, track each path through the ...
Definition zero_dim_solve.hpp:546
Runtime options selecting which ZeroDim algorithm to instantiate.
Definition switches_zerodim.hpp:54
type::Tracker tracker
Which path tracker to use.
Definition switches_zerodim.hpp:59
type::Endgame endgame
Which endgame to use.
Definition switches_zerodim.hpp:60
A sequence of switches for getting a particular instantiation of a ZeroDim algorithm,...
Collects the various header files which define the Bertini2 systems.
Provides the algorithm for computing all zero-dimensional solutions for an algberaic system.