An implementation of straight-line programs, implemented with strong inspiration from Bertini1's implementation.
More...
|
| | StraightLineProgram (System const &sys) |
| | The constructor – how to make a SLP from a System.
|
| | StraightLineProgram () |
| template<typename Derived> |
| void | Eval (Eigen::MatrixBase< Derived > const &variable_values) const |
| | Evaluate the program at the given variable values (no path variable).
|
| template<typename Derived, typename ComplexT> |
| void | Eval (Eigen::MatrixBase< Derived > const &variable_values, ComplexT const &time) const |
| | copies the variable values into the Matrix base and the path variables into the complex type time
|
| template<typename T> |
| void | EvalFunctions () const |
| | Evaluate the program's functions (currently a synonym for the full Eval).
|
| template<typename T> |
| void | EvalJacobian () const |
| | Evaluate the program's Jacobian (currently a synonym for the full Eval).
|
| template<typename T> |
| void | EvalTimeDeriv () const |
| | Evaluate the program's time derivative (currently a synonym for the full Eval).
|
| std::shared_ptr< const SLPProgram > | Program () const |
| | The immutable compiled program this facade runs.
|
| size_t | NumRealSlots () const |
| | Number of slots the compiler inferred as NumType::Real (ADR-0034).
|
| template<typename NumT> |
| NumT | ReadSlotAsComplex (size_t slot) const |
| | Read a slot's value as a complex NumT, pulling from its real or complex bank per its NumType.
|
| template<typename NumT> |
| void | GetFuncValsInPlace (Eigen::Ref< Vec< NumT > > result) const |
| | Copy the computed function values into the provided vector (does not resize it).
|
| template<typename NumT> |
| void | GetJacobianInPlace (Eigen::Ref< Mat< NumT > > result) const |
| | retrieves the computed values of jacobians
|
| template<typename NumT> |
| void | GetTimeDerivInPlace (Eigen::Ref< Vec< NumT > > result) const |
| | copies the values of the time derivatives into your given vector
|
| template<typename NumT> |
| Vec< NumT > | GetFuncVals () const |
| | creates the Vec<NumT> to be used in the overloaded function
|
| template<typename NumT> |
| Mat< NumT > | GetJacobian () const |
| | creates the Vec<NumT> to be used in the overloaded function
|
| template<typename NumT> |
| Vec< NumT > | GetTimeDeriv () const |
| | creates the Vec<NumT> to be used in the overloaded function
|
| unsigned | NumFunctions () const |
| | Get the number of functions in the program.
|
| unsigned | NumVariables () const |
| | Get the number of variables in the program.
|
| size_t | NumMemorySlots () const |
| | Number of memory slots: one per distinct value the program holds (inputs, constants, and one per compiled subexpression).
|
| size_t | FirstLiveInstructionOffset () const |
| | Word offset into the instruction tape where the live segment begins (== total word length of the frozen, constants-only prologue).
|
| unsigned | precision () const |
| | Get the current precision of the SLP.
|
| void | precision (unsigned new_precision) const |
| | change the precision of the SLP.
|
| template<typename Derived> |
| void | SyncPrecision (Eigen::MatrixBase< Derived > const &variable_values) const |
| | Materialize this program's memory at the precision of the point being evaluated.
|
| bool | HavePathVariable () const |
| | Does this SLP have a path variable?
|
| template<typename Derived> |
| void | SetVariableValues (Eigen::MatrixBase< Derived > const &variable_values) const |
| | Copy the values of the variables from the passed in vector to memory.
|
| template<typename ComplexT> |
| void | SetPathVariable (ComplexT const &time) const |
| | Copy the current time value to memory.
|
An implementation of straight-line programs, implemented with strong inspiration from Bertini1's implementation.
One constructs a SLP from a system, like
StraightLineProgram(System const &sys)
The constructor – how to make a SLP from a System.
The fundamental polynomial system class for Bertini2.
Definition system.hpp:106
Maybe you don't need to know this, but in construction the SLP uses a helper class, the SLPCompiler
Patches are just functions in this framework. The variables appear at the front of the memory, then functions, then derivatives. This should make copying data out easy, because it's all in one place.
In contrast to Bertini1 SLP's, we don't put all the numbers at the front – they just get scattered through the SLP's memory.
The class is a thin facade (ADR-0027) over an immutable, shareable SLPProgram and a per-thread SLPMemory.
template<typename Derived>
| void bertini::StraightLineProgram::SyncPrecision |
( |
Eigen::MatrixBase< Derived > const & | variable_values | ) |
const |
|
inline |
Materialize this program's memory at the precision of the point being evaluated.
Every evaluable type self-aligns under this name – the blocks, the patch, and here – so no caller and no owning System has to fan a precision out beforehand (ADR-0057). precision() short-circuits when already there, so the steady state is one integer compare. No-op for double, which carries no precision.
- Parameters
-
| variable_values | The point about to be evaluated at. |