Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
total_degree_linear_product.hpp
Go to the documentation of this file.
1//This file is part of Bertini 2.
2//
3//total_degree_linear_product.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//total_degree_linear_product.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 total_degree_linear_product.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
27
28#pragma once
29
32
33namespace bertini
34{
35 namespace start_system{
36
37
61 {
62 public:
64 virtual ~TotalDegreeLinearProduct() = default;
65
72
73
77 unsigned long long NumStartPoints() const override;
78
81
83
85 void SanityChecks(System const& s);
86
87 private:
88
92 void CopyDegrees(System const& s);
93
99 void SeedLinearCoeffs(System const& s);
100
106 void BuildBlock(System const& s);
107
108
114 Vec<complex_dbl> GenerateStartPoint(complex_dbl,unsigned long long index) const override;
115
121 Vec<complex_mp> GenerateStartPoint(complex_mp,unsigned long long index) const override;
122
126 template<typename T>
127 void GenerateStartPointT(Vec<T>& start_point, unsigned long long index) const;
128
129 std::vector<unsigned long long> degrees_;
135 std::vector<Mat<complex_mp>> linear_coeffs_;
136
137
139
140 template <typename Archive>
141 void serialize(Archive& ar, const unsigned /*version*/) {
142 ar & boost::serialization::base_object<StartSystem>(*this);
143 ar & degrees_;
144 // serialize the coefficients too (unlike MHomogeneous, which persists only degrees_):
145 // a round-tripped TotalDegreeLinearProduct can then regenerate its start points, not merely evaluate.
146 ar & linear_coeffs_;
147 }
148
149 };
150 }
151}
System()
The default constructor for a system.
Definition system.hpp:117
std::shared_ptr< node::Node > Nd
Shorthand for a shared pointer to a generic expression-tree node.
Definition system.hpp:112
Abstract base class for other start systems.
Definition start_base.hpp:83
TotalDegreeLinearProduct(System const &s)
Constructor for making a total degree start system from a polynomial system.
void SanityChecks(System const &s)
Check that the target system is suitable for a total-degree start system.
unsigned long long NumStartPoints() const override
Get the number of start points for this total degree start system.
TotalDegreeLinearProduct & operator*=(Nd const &n)
Multiply this start system in place by an expression node.
friend class boost::serialization::access
Definition total_degree_linear_product.hpp:138
TotalDegreeLinearProduct & operator+=(System const &sys)=delete
Definition zero_dim_solve.hpp:68
Definition algorithm_builder.hpp:36
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
bmp::number< mpc_complex_backend< 0 >, bmp::et_on > complex_mp
The arbitrary-precision complex number type.
Definition mpfr_complex.hpp:58
Defines generic start system type.
utilities for start system code.