|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
A block forming the blend (coupling homotopy) H = sum_i c_i(t) * operand_i of several systems. More...
#include <blend_block.hpp>
Public Types | |
| using | Nd = std::shared_ptr<node::Node> |
| Shorthand for a shared pointer to a generic node. | |
| using | Var = std::shared_ptr<node::Variable> |
| Shorthand for a shared pointer to a variable node. | |
| using | OperandPtr = std::shared_ptr<const SystemT> |
| Shorthand for a shared pointer to a (const) operand system. | |
Public Member Functions | |
| BlendBlock () | |
| Construct an empty blend block at the current default precision. | |
| BlendBlock (Var path_variable, std::vector< Nd > coefficients, std::vector< OperandPtr > operands) | |
| BlendBlock (BlendBlock const &other) | |
| Memory-isolating copy constructor (deep-copies each operand system; ADR-0027). | |
| BlendBlock & | operator= (BlendBlock const &other) |
| Memory-isolating copy assignment (deep-copies each operand system; ADR-0027). | |
| BlendBlock (BlendBlock &&)=default | |
| Move constructor. | |
| BlendBlock & | operator= (BlendBlock &&)=default |
| Move assignment. | |
| size_t | NumFunctions () const |
| The number of (natural) functions the blend contributes; the owning System adds any patch. | |
| std::vector< Nd > const & | Coefficients () const |
| Accessors for the function-tree expansion (System::ExpandToFunctionTree): the blend is H = sum_i coefficients_[i](t) * operands_[i], so the expansion needs the coefficient nodes, the operand systems (each itself expanded), and the shared path variable. | |
| std::vector< OperandPtr > const & | Operands () const |
| Get the operand systems being blended. | |
| Var const & | PathVariable () const |
| Get the shared path variable the coefficients are functions of. | |
| void | Describe (std::ostream &out, size_t &row, VariableGroup const &, bool verbose) const |
| Human-facing description: terse shows the blend f_a..f_b = c_0(t)*A + c_1(t)*B, with the coefficient nodes shown symbolically and the operands labelled A, B, ...; verbose lists each operand's functions indented. | |
| std::vector< int > | Degrees () const |
| The blend c_0(t)f_0 + c_1(t)f_1 + ... has, per function, the max degree of its operands in the space variables (the t-coefficients are constant in space). | |
| std::vector< int > | Degrees (VariableGroup const &vars) const |
| Per-function degrees with respect to a given variable group. | |
| void | Homogenize (VariableGroup const &, std::shared_ptr< node::Variable > const &) |
| No-op: a blend's operands are already-prepared and cannot be homogenized. | |
| bool | IsHomogeneous (VariableGroup const &) const |
| Query whether the blend is homogeneous (iff all operands are). | |
| bool | IsPolynomial (VariableGroup const &) const |
| Query whether the blend is polynomial (iff all operands are). | |
| bool | DependsOnPathVariable () const |
| A blend always depends on the path variable (through its coefficients). | |
| bool | HasConstantJacobian () const |
| A blend does not have a constant Jacobian. | |
| void | Differentiate () const |
| Analytic block: nothing symbolic to differentiate. | |
| void | Reintern (node::ReinternMemo &memo) |
| Re-intern this block's nodes after deserialization (ADR-0042): path variable and coefficient nodes (gamma) rebuild through the live intern tables via the shared memo; derivative coefficients are re-derived from the rebuilt ones; operand systems recurse (loaded objects are owned here, so the const is safely cast away). | |
| unsigned | Precision () const |
| Get the block's current working precision. | |
| void | Precision (unsigned new_precision) const |
| Set the block's working precision (propagated to the operand systems). | |
| template<typename T> | |
| void | EvalInPlace (Eigen::Ref< Vec< T > > result, Vec< T > const &vars, T const &path_value) const |
| H(x,t) = sum_i c_i(t) * f_i(x) (natural functions only). | |
| template<typename T> | |
| void | JacobianInPlace (Eigen::Ref< Mat< T > > J, Vec< T > const &vars, T const &path_value) const |
| dH/dx = sum_i c_i(t) * (df_i/dx) (natural rows only) | |
| template<typename T> | |
| void | TimeDerivInPlace (Eigen::Ref< Vec< T > > result, Vec< T > const &vars, T const &path_value) const |
| dH/dt = sum_i c_i'(t) * f_i(x) (operands are autonomous in t) | |
Static Public Member Functions | |
| static int | CombineDegrees (int a, int b) |
| Combine two per-function degrees, propagating the not-a-polynomial sentinel. | |
Friends | |
| class | boost::serialization::access |
A block forming the blend (coupling homotopy) H = sum_i c_i(t) * operand_i of several systems.
| using bertini::blocks::BlendBlock< SystemT >::Nd = std::shared_ptr<node::Node> |
Shorthand for a shared pointer to a generic node.
| using bertini::blocks::BlendBlock< SystemT >::OperandPtr = std::shared_ptr<const SystemT> |
Shorthand for a shared pointer to a (const) operand system.
| using bertini::blocks::BlendBlock< SystemT >::Var = std::shared_ptr<node::Variable> |
Shorthand for a shared pointer to a variable node.
|
inline |
Construct an empty blend block at the current default precision.
|
inline |
| path_variable | The shared path variable t the coefficients are functions of. |
| coefficients | One coefficient node c_i(t) per operand. |
| operands | The Systems being blended; all must share NumNaturalFunctions(). |
|
inline |
Memory-isolating copy constructor (deep-copies each operand system; ADR-0027).
|
default |
Move constructor.
|
inline |
Accessors for the function-tree expansion (System::ExpandToFunctionTree): the blend is H = sum_i coefficients_[i](t) * operands_[i], so the expansion needs the coefficient nodes, the operand systems (each itself expanded), and the shared path variable.
|
inlinestatic |
Combine two per-function degrees, propagating the not-a-polynomial sentinel.
A blend of functions is a polynomial only when every operand is, so a -1 from any operand must survive. A plain maximum starting at zero silently turned it into a claim of degree zero, which is how a transcendental homotopy came to report itself as a constant.
|
inline |
The blend c_0(t)f_0 + c_1(t)f_1 + ... has, per function, the max degree of its operands in the space variables (the t-coefficients are constant in space).
A function that is not a polynomial reports -1, and that answer propagates through the blend.
|
inline |
Per-function degrees with respect to a given variable group.
|
inline |
A blend always depends on the path variable (through its coefficients).
|
inline |
Human-facing description: terse shows the blend f_a..f_b = c_0(t)*A + c_1(t)*B, with the coefficient nodes shown symbolically and the operands labelled A, B, ...; verbose lists each operand's functions indented.
|
inline |
Analytic block: nothing symbolic to differentiate.
|
inline |
H(x,t) = sum_i c_i(t) * f_i(x) (natural functions only).
|
inline |
A blend does not have a constant Jacobian.
|
inline |
No-op: a blend's operands are already-prepared and cannot be homogenized.
|
inline |
Query whether the blend is homogeneous (iff all operands are).
|
inline |
Query whether the blend is polynomial (iff all operands are).
|
inline |
dH/dx = sum_i c_i(t) * (df_i/dx) (natural rows only)
|
inline |
The number of (natural) functions the blend contributes; the owning System adds any patch.
|
inline |
Get the operand systems being blended.
|
default |
Move assignment.
|
inline |
Memory-isolating copy assignment (deep-copies each operand system; ADR-0027).
|
inline |
Get the shared path variable the coefficients are functions of.
|
inline |
Get the block's current working precision.
|
inline |
Set the block's working precision (propagated to the operand systems).
|
inline |
Re-intern this block's nodes after deserialization (ADR-0042): path variable and coefficient nodes (gamma) rebuild through the live intern tables via the shared memo; derivative coefficients are re-derived from the rebuilt ones; operand systems recurse (loaded objects are owned here, so the const is safely cast away).
Content unchanged.
|
inline |
dH/dt = sum_i c_i'(t) * f_i(x) (operands are autonomous in t)
|
friend |