|
Bertini 2 - C++ Core
Software for Numerical Algebraic Geometry
|
Represents variable leaves in the function tree. More...
#include <variable.hpp>
Public Member Functions | |
| int | Degree (std::shared_ptr< Variable > const &v=nullptr) const override |
| int | Degree (VariableGroup const &vars) const override |
| std::shared_ptr< Node > | Differentiate (std::shared_ptr< Variable > const &v=nullptr) const override |
| void | Homogenize (VariableGroup const &vars, std::shared_ptr< Variable > const &homvar) override |
| bool | IsHomogeneous (std::shared_ptr< Variable > const &v=nullptr) const override |
| bool | IsHomogeneous (VariableGroup const &vars) const override |
| std::vector< int > | MultiDegree (VariableGroup const &vars) const override |
| void | precision (unsigned int prec) const override |
| void | Reset () const override |
| template<typename T> | |
| void | SetToNan () |
| Changes the value of the variable to be not-a-number. | |
| template<typename T> | |
| void | SetToRand () |
| Changes the value of the variable to be a random complex number. | |
| template<typename T> | |
| void | SetToRandUnit () |
| Changes the value of the variable to be a random complex number, of magnitude 1. | |
Public Member Functions inherited from bertini::node::NamedSymbol | |
| const std::string & | name () const |
| void | name (const std::string &new_name) |
| NamedSymbol (const std::string &new_name) | |
| void | print (std::ostream &target) const override |
Public Member Functions inherited from bertini::node::Symbol | |
| unsigned | EliminateOnes () override |
| A transform function, which eliminates nodes from the tree. | |
| unsigned | EliminateZeros () override |
| A transform function, which eliminates nodes from the tree. | |
Public Member Functions inherited from bertini::node::Node | |
| template<typename T> | |
| T | Eval (std::shared_ptr< Variable > const &diff_variable=nullptr) const |
| template<typename T> | |
| void | EvalInPlace (T &eval_value, std::shared_ptr< Variable > const &diff_variable=nullptr) const |
| bool | IsPolynomial (std::shared_ptr< Variable > const &v=nullptr) const |
| bool | IsPolynomial (VariableGroup const &v) const |
| virtual unsigned | ReduceDepth () |
| A mutating function which finds ways to reduce the depth of the tree. | |
Protected Member Functions | |
| void | FreshEval_d (dbl &evaluation_value, std::shared_ptr< Variable > const &diff_variable) const override |
| dbl | FreshEval_d (std::shared_ptr< Variable > const &diff_variable) const override |
| void | FreshEval_mp (mpfr_complex &evaluation_value, std::shared_ptr< Variable > const &diff_variable) const override |
| mpfr_complex | FreshEval_mp (std::shared_ptr< Variable > const &diff_variable) const override |
Protected Member Functions inherited from bertini::node::Node | |
| void | ResetStoredValues () const |
Additional Inherited Members | |
Static Protected Member Functions inherited from bertini::VisitableBase< RetT, CatchAll > | |
| template<typename T> | |
| static VisitReturnType | AcceptBase (T &visited, VisitorBase &guest) |
| Abstract method for how to accept a visitor. | |
Represents variable leaves in the function tree.
This class represents variable leaves in the function tree. FreshEval returns the current value of the variable.
When differentiated, produces a differential referring to it.
|
overridevirtual |
Compute the degree with respect to a single variable.
If this is the variable, then the degree is 1. Otherwise, 0.
Implements bertini::node::Node.
|
overridevirtual |
Compute the overall degree with respect to a variable group.
| vars | A group of variables. |
Implements bertini::node::Node.
|
overridevirtual |
Differentiates a variable.
Implements bertini::node::Node.
|
overrideprotectedvirtual |
Overridden code for specific node types, for how to evaluate themselves. Called from the wrapper EvalInPlace<>() call from Node, if so required (by resetting, etc).
If we had the ability to use template virtual functions, we would have. However, this is impossible with current C++ without using experimental libraries, so we have two copies – because there are two number types for Nodes, dbl and mpfr_complex.
Implements bertini::node::Node.
|
overrideprotectedvirtual |
Overridden code for specific node types, for how to evaluate themselves. Called from the wrapper Eval<>() call from Node, if so required (by resetting, etc).
If we had the ability to use template virtual functions, we would have. However, this is impossible with current C++ without using experimental libraries, so we have two copies – because there are two number types for Nodes, dbl and mpfr_complex.
Implements bertini::node::Node.
|
overrideprotectedvirtual |
Overridden code for specific node types, for how to evaluate themselves. Called from the wrapper Eval<>() call from Node, if so required (by resetting, etc).
If we had the ability to use template virtual functions, we would have. However, this is impossible with current C++ without using experimental libraries, so we have two copies – because there are two number types for Nodes, dbl and mpfr_complex.
Implements bertini::node::Node.
|
overrideprotectedvirtual |
Overridden code for specific node types, for how to evaluate themselves. Called from the wrapper Eval<>() call from Node, if so required (by resetting, etc).
If we had the ability to use template virtual functions, we would have. However, this is impossible with current C++ without using experimental libraries, so we have two copies – because there are two number types for Nodes, dbl and mpfr_complex.
Implements bertini::node::Node.
|
overridevirtual |
Homogenize a tree, inputting a variable group holding the non-homogeneous variables, and the new homogenizing variable. The homvar may be an element of the variable group, that's perfectly ok.
| homvar | The homogenizing variable, which is multiplied against terms with degree deficiency with repect to other terms. |
| vars | A group of variables, with respect to which you wish to homogenize. |
Implements bertini::node::Node.
|
overridevirtual |
Check for homogeneity, absolutely with respect to all variables, including path variables and all other variable types, or with respect to a single varaible, if passed.
Implements bertini::node::Node.
|
overridevirtual |
Check for homogeneity, with respect to a variable group.
Implements bertini::node::Node.
|
overridevirtual |
Compute the multidegree with respect to a variable group. This is for homogenization, and testing for homogeneity.
Implements bertini::node::Node.
|
overridevirtual |
Change the precision of this variable-precision tree node.
| prec | the number of digits to change precision to. |
Implements bertini::node::Node.
|
overridevirtual |
Tells code to run a fresh eval on node next time.
Implements bertini::node::Node.
| template void bertini::node::Variable::SetToNan< mpfr_complex > | ( | ) |
Changes the value of the variable to be not-a-number.
| template void bertini::node::Variable::SetToRand< mpfr_complex > | ( | ) |
Changes the value of the variable to be a random complex number.
| template void bertini::node::Variable::SetToRandUnit< mpfr_complex > | ( | ) |
Changes the value of the variable to be a random complex number, of magnitude 1.