|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
A linear slice of affine or projective space: a stack of linear forms, M [x ; 1]. More...
#include <slice.hpp>
Public Member Functions | |
| Slice ()=default | |
| An empty slice (zero forms, zero variables). | |
| template<typename NumT> | |
| void | Eval (Vec< NumT > &result, Vec< NumT > const &x) const |
| Evaluate the slice's linear-form values, in-place. | |
| template<typename NumT> | |
| Vec< NumT > | Eval (Vec< NumT > const &x) const |
| Evaluate the slice's linear-form values. | |
| template<typename NumT> | |
| void | Jacobian (Mat< NumT > &result, Vec< NumT > const &x) const |
| The slice's Jacobian (its constant variable-coefficient matrix), in-place. | |
| template<typename NumT> | |
| Mat< NumT > | Jacobian (Vec< NumT > const &x) const |
| The slice's Jacobian (its constant variable-coefficient matrix). | |
| Mat< complex_mp > const & | Coefficients () const |
| The augmented coefficient matrix: one row per linear form, (Dimension) x (NumVariables+1), the trailing column carrying each form's constant term. | |
| blocks::LinearFormsBlock const & | AsLinearFormsBlock () const |
| The underlying linear-forms block (eval / Jacobian / precision engine). | |
| void | AddTo (System &s) const |
| Add this slice's linear forms to a System as a LinearFormsBlock. (Defined in slice.cpp.). | |
| System | AsSystem () const |
| A standalone System whose functions are exactly this slice's linear forms (over the slice's variable group). | |
| Slice | Concatenate (Slice const &other) const |
A new slice stacking this slice's linear forms on top of other's. | |
| Slice | Head (unsigned m) const |
A new slice over the same variables built from the first m linear forms. | |
| Slice | Tail (unsigned m) const |
A new slice over the same variables built from the last m linear forms. | |
| Slice | Rows (std::vector< unsigned > const &indices) const |
| A new slice over the same variables built from the chosen linear forms. | |
| unsigned | Dimension () const |
| The dimension of the slice – the number of linear forms. | |
| unsigned | NumVariables () const |
| The number of variables sliced. | |
| VariableGroup const & | Variables () const |
| The variables the slice is a function of. | |
| bool | IsHomogeneous () const |
| Whether the slice was authored without constant terms (passes through the origin). | |
| unsigned | Precision () const |
| Get the current working precision of the slice, in digits. | |
| void | Precision (unsigned new_precision) const |
| Set the working precision of the slice, in digits. | |
Static Public Member Functions | |
| static Slice | FromCoefficients (VariableGroup const &v, Mat< complex_mp > const &augmented_coefficients, bool homogeneous=false) |
| Build a slice directly from an augmented coefficient matrix. | |
| static Slice | ThroughPoint (VariableGroup const &v, Mat< complex_mp > const &coefficients, Vec< complex_mp > const &point) |
| Build an affine slice whose every linear form vanishes at a given point. | |
| static Slice | RandomReal (VariableGroup const &v, unsigned dim, bool homogeneous=false, bool orthogonal=true, Vec< complex_mp > const *through_point=nullptr) |
| Produce a random real slice on a variable group, slicing a given number of dimensions. | |
| static Slice | RandomComplex (VariableGroup const &v, unsigned dim, bool homogeneous=false, bool orthogonal=true, Vec< complex_mp > const *through_point=nullptr) |
| Generate a random complex slice. | |
| static Slice | Make (VariableGroup const &v, unsigned dim, bool homogeneous, bool orthogonal, bool real, std::function< void(complex_mp &, unsigned)> gen, Vec< complex_mp > const *through_point=nullptr) |
| Factory for generating slices. | |
Friends | |
| class | boost::serialization::access |
| std::ostream & | operator<< (std::ostream &out, Slice const &s) |
| Provides output streaming for Slice. | |
A linear slice of affine or projective space: a stack of linear forms, M [x ; 1].
The slice is held as an augmented coefficient matrix (one row per linear form, the trailing column being that form's constant term) inside a LinearFormsBlock. A homogeneous slice simply has a zero constant column. Slices compose: Head / Tail / Rows return a new Slice over the same variables built from a subset of the linear forms.
|
default |
An empty slice (zero forms, zero variables).
| void bertini::Slice::AddTo | ( | System & | s | ) | const |
Add this slice's linear forms to a System as a LinearFormsBlock. (Defined in slice.cpp.).
|
inline |
The underlying linear-forms block (eval / Jacobian / precision engine).
| System bertini::Slice::AsSystem | ( | ) | const |
A standalone System whose functions are exactly this slice's linear forms (over the slice's variable group).
Lets a slice be carried around and evaluated / tracked on its own. (Defined in slice.cpp.)
|
inline |
The augmented coefficient matrix: one row per linear form, (Dimension) x (NumVariables+1), the trailing column carrying each form's constant term.
These rows are also factor rows for a ProductsOfLinearsBlock, so a slice composes directly into the product-of-linears form regeneration uses.
A new slice stacking this slice's linear forms on top of other's.
Both slices must be on the same number of variables. The result is homogeneous only if both operands are. This is how you build a higher-codimension slice from pieces (and the Python + operator).
|
inline |
The dimension of the slice – the number of linear forms.
|
inline |
Evaluate the slice's linear-form values, in-place.
Evaluate the slice's linear-form values.
|
inlinestatic |
Build a slice directly from an augmented coefficient matrix.
| v | The variables the slice is a function of. |
| augmented_coefficients | One row per linear form, (number-of-forms) x (v.size()+1); the trailing column is each form's constant term (zero, for a homogeneous slice). |
| homogeneous | Whether the slice was authored without constant terms. |
|
inline |
A new slice over the same variables built from the first m linear forms.
|
inline |
Whether the slice was authored without constant terms (passes through the origin).
|
inline |
The slice's Jacobian (its constant variable-coefficient matrix), in-place.
The slice's Jacobian (its constant variable-coefficient matrix).
|
inlinestatic |
Factory for generating slices.
Generates the variable-coefficient block (optionally orthonormalized by a QR factorization) and the constant column, then assembles the augmented matrix the LinearFormsBlock holds.
| v | The variable group the slice is over. |
| dim | The number of linear forms (the slice's dimension). |
| homogeneous | Whether the slice is homogeneous (zero constant column). |
| orthogonal | Whether to orthonormalize the coefficient block via a QR factorization. |
| real | Whether the coefficients are real (a real orthonormal block on the orthogonal path, matching the real gen used on the non-orthogonal path and for the constant column). |
| gen | The scalar generator used for the non-orthogonal coefficients and the constant column. |
| through_point | If non-null, a point the slice must pass through (length v.size(); affine, or homogeneous when the slice is homogeneous); overrides the random constant column. |
|
inline |
The number of variables sliced.
|
inline |
Get the current working precision of the slice, in digits.
|
inline |
Set the working precision of the slice, in digits.
|
inlinestatic |
Generate a random complex slice.
| v | The variable group the slice is over. |
| dim | The number of linear forms (the slice's dimension). |
| homogeneous | Whether the slice is homogeneous (zero constant column). |
| orthogonal | Whether to orthonormalize the coefficient block via a QR factorization. |
| through_point | If non-null, a point the slice must pass through (length v.size(); affine, or homogeneous when homogeneous=true). |
|
inlinestatic |
Produce a random real slice on a variable group, slicing a given number of dimensions.
| v | The variable group the slice is over. |
| dim | The number of linear forms (the slice's dimension). |
| homogeneous | Whether the slice is homogeneous (zero constant column). |
| orthogonal | Whether to orthonormalize the coefficient block via a QR factorization. |
| through_point | If non-null, a point the slice must pass through (length v.size(); affine, or homogeneous when homogeneous=true). |
|
inline |
A new slice over the same variables built from the chosen linear forms.
|
inline |
A new slice over the same variables built from the last m linear forms.
|
inlinestatic |
Build an affine slice whose every linear form vanishes at a given point.
Given a bare (non-augmented) coefficient block A and a point p, this assembles the augmented matrix [ A | -A*p ], so each form A_i*x - A_i*p = 0 passes through p. The result is affine (non-homogeneous): a homogeneous form cannot pass through an arbitrary point via a constant term (it would need its rows orthogonal to p – see the random factories' homogeneous through-point path).
| v | The variables the slice is a function of. |
| coefficients | The bare coefficient block, (number-of-forms) x v.size() (NOT augmented). |
| point | The point the slice must pass through, length v.size(). |
|
inline |
The variables the slice is a function of.
|
friend |