|
| | Patch () |
| | Default constructor.
|
| | Patch (Patch const &other) |
| | Custom copy constructor, ensuring the max-precision coefficients are copied in highest precision.
|
| Patch & | operator= (Patch const &other)=default |
| | Copy assignment.
|
| | Patch (std::vector< unsigned > const &sizes) |
| | Constructor making a random complex patch on a space whose structure is described by the input argument.
|
| | Patch (std::vector< unsigned > const &sizes, std::vector< Vec< complex_mp > > const &coefficients) |
| | Construct a patch from given coefficients – for a loader restoring an archived patch exactly (the canonical-encoding reader), never for making a fresh one (use Random).
|
| unsigned | Precision () const |
| | Get the current precision of the patch.
|
| template<typename T> |
| void | SyncPrecision (Vec< T > const &x) const |
| | Materialize the working coefficients at the precision of the point being evaluated.
|
| void | Precision (unsigned new_precision) const |
| | Set the precision of the patch.
|
| template<typename Derived, typename T> |
| void | EvalInPlace (Eigen::MatrixBase< Derived > &function_values, Vec< T > const &x) const |
| | Evaluate the patch at a point, in place.
|
| template<typename T> |
| Vec< T > | Eval (Vec< T > const &x) const |
| | Evaluate the patch at a point.
|
| template<typename Derived, typename T> |
| void | JacobianInPlace (Eigen::MatrixBase< Derived > &jacobian, Vec< T > const &x) const |
| | Evaluate the Jacobian matrix, in place.
|
| template<typename T> |
| Mat< T > | Jacobian (Vec< T > const &x) const |
| | Evaluate the Jacobian matrix, in place.
|
| template<typename T> |
| void | RescalePointToFitInPlace (Vec< T > &x) const |
| | Rescale a point so that it satisfies the patch equations herein contained.
|
| template<typename T> |
| Vec< T > | RescalePoint (Vec< T > const &x) const |
| | Rescale a point so that it satisfies the patch equations herein contained.
|
| unsigned | NumVariableGroups () const |
| | Get the number of variable groups.
|
| unsigned | NumVariables () const |
| | Get the number of variables in the patch.
|
| std::vector< Vec< complex_mp > > const & | Coefficients () const |
| | The patch's highest-precision coefficients, one vector per variable group.
|
| std::vector< unsigned > const & | VariableGroupSizes () const |
| | The number of variables in each variable group (homogenizing variable included).
|
| bool | operator== (Patch const &rhs) const |
| | Check whether two patches are the same.
|
| bool | operator!= (Patch const &rhs) const |
| | Check whether two patches are different.
|
An affine chart on a product of projective spaces.
This class provides an adjustable-precision patch on a working space for solving a polynomial system using homotopy continuation.
The constant values for the patch are unity.
Example code, not using a bertini::System to generate the patch.
std::vector<unsigned> s{2,3};
auto v_rescaled = p.RescalePoint(v);
auto f = p.Eval(v_rescaled);
An affine chart on a product of projective spaces.
Definition patch.hpp:85
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
At the end of the above example, the patch evaluates to 0 in the container
.
Other ways of patching
Patches can also be applied to a system, which should first be homogenized.
| bertini::Patch::Patch |
( |
std::vector< unsigned > const & | sizes | ) |
|
|
inline |
Constructor making a random complex patch on a space whose structure is described by the input argument.
The sizes input give the number of total variables, including homogenizing variables, for the product of spaces forming the total space to be patched. The patch has no idea whether the underlying space is projective or affine – that is handled somewhere else, likely in a bertini::System.
The initial precision of the patch is set to current default precision, and the precision of the highest precision coefficients are set to the current default as well.
- Parameters
-
| sizes | The sizes of the variable groups, including homogenizing variables if present. |