Bertini 2 - C++ Core
Software for Numerical Algebraic Geometry
Loading...
Searching...
No Matches
bertini::StraightLineProgram Class Reference

#include <straight_line_program.hpp>

Classes

struct  InputLocations
 
struct  NumberOf
 
struct  OutputLocations
 

Public Member Functions

template<typename NumT>
void Eval () const
 loops through the instructions in memory and evaluates each operation
 
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 NumT>
Vec< NumT > GetFuncVals () const
 creates the Vec<NumT> to be used in the overloaded function
 
template<typename NumT>
void GetFuncValsInPlace (Vec< NumT > &result) const
 assignts the computed values of functions into the given vector
 
template<typename NumT>
Mat< NumT > GetJacobian () const
 creates the Vec<NumT> to be used in the overloaded function
 
template<typename NumT>
void GetJacobianInPlace (Mat< NumT > &result) const
 retrieves the computed values of jacobians
 
template<typename NumT>
Vec< NumT > GetTimeDeriv () const
 creates the Vec<NumT> to be used in the overloaded function
 
template<typename NumT>
void GetTimeDerivInPlace (Vec< NumT > &result) const
 copies the values of the time derivatives into your given vector
 
bool HavePathVariable () const
 Does this SLP have a path variable?
 
unsigned precision () const
 Get the current precision of the SLP.
 
void precision (unsigned new_precision) const
 change the precision of the SLP.
 
template<typename ComplexT>
void SetPathVariable (ComplexT const &time) const
 Copy the current time value to memory.
 
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.
 
 StraightLineProgram (System const &sys)
 

Friends

std::ostream & operator<< (std::ostream &out, const StraightLineProgram &s)
 Overloaded operator for printing to an arbirtary out stream.
 

Detailed Description

An implementation of straight-line programs, implemented with strong inspiration from Bertini1's implementation.

One constructs a SLP from a system, like

System my_system();
StraightLineProgram slp(my_system);
StraightLineProgram(System const &sys)
Definition straight_line_program.cpp:62
The fundamental polynomial system class for Bertini2.
Definition system/system.hpp:99

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.

Constructor & Destructor Documentation

◆ StraightLineProgram()

bertini::StraightLineProgram::StraightLineProgram ( System const & sys)

The constructor – how to make a SLP from a System.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ Eval() [1/2]

template<typename NumT>
template void bertini::StraightLineProgram::Eval< mpfr_complex > ( ) const

loops through the instructions in memory and evaluates each operation

Template Parameters
NumTnumeric type

uses a switch to find different operations from memory to make sure its performing the correct evaluations

todo: implement a compile-time version of this using Boost.Hana

Here is the caller graph for this function:

◆ Eval() [2/2]

template<typename Derived, typename ComplexT>
void bertini::StraightLineProgram::Eval ( Eigen::MatrixBase< Derived > const & variable_values,
ComplexT const & time ) const
inline

copies the variable values into the Matrix base and the path variables into the complex type time

Template Parameters
Derivedderived type
ComplexTcomplex type
Parameters
variable_valuesdervied matrixBase of variable values
timecomplex type for time
Here is the call graph for this function:

◆ GetFuncVals()

template<typename NumT>
Vec< NumT > bertini::StraightLineProgram::GetFuncVals ( ) const
inline

creates the Vec<NumT> to be used in the overloaded function

Template Parameters
NumTnumeric type
Here is the call graph for this function:

◆ GetFuncValsInPlace()

template<typename NumT>
void bertini::StraightLineProgram::GetFuncValsInPlace ( Vec< NumT > & result) const
inline

assignts the computed values of functions into the given vector

Template Parameters
NumTnumeric type
Parameters
resultThe vector you're going to store the values into

the function will NOT automatically resize your vector for you to be the correct size

Here is the caller graph for this function:

◆ GetJacobian()

template<typename NumT>
Mat< NumT > bertini::StraightLineProgram::GetJacobian ( ) const
inline

creates the Vec<NumT> to be used in the overloaded function

Template Parameters
NumTnumeric type
Here is the call graph for this function:

◆ GetJacobianInPlace()

template<typename NumT>
void bertini::StraightLineProgram::GetJacobianInPlace ( Mat< NumT > & result) const
inline

retrieves the computed values of jacobians

Template Parameters
NumTnumeric type
Parameters
resultThe vector you're going to store the values into

the function will NOT automatically resize your vector for you to be the correct size

Here is the caller graph for this function:

◆ GetTimeDeriv()

template<typename NumT>
Vec< NumT > bertini::StraightLineProgram::GetTimeDeriv ( ) const
inline

creates the Vec<NumT> to be used in the overloaded function

Template Parameters
NumTnumeric type
Here is the call graph for this function:

◆ GetTimeDerivInPlace()

template<typename NumT>
void bertini::StraightLineProgram::GetTimeDerivInPlace ( Vec< NumT > & result) const
inline

copies the values of the time derivatives into your given vector

Template Parameters
NumTnumeric type
Parameters
resultThe vector you're going to store the values into

the function will automatically resize your vector for you to be the correct size

Here is the caller graph for this function:

◆ HavePathVariable()

bool bertini::StraightLineProgram::HavePathVariable ( ) const
inline

Does this SLP have a path variable?

Returns
Well, does it?
Here is the caller graph for this function:

◆ precision() [1/2]

unsigned bertini::StraightLineProgram::precision ( ) const
inline

Get the current precision of the SLP.

Returns
The number of digits

◆ precision() [2/2]

void bertini::StraightLineProgram::precision ( unsigned new_precision) const

change the precision of the SLP.

Downsamples from the true values.

Parameters
new_precisionThe new number of digits

◆ SetPathVariable()

template<typename ComplexT>
void bertini::StraightLineProgram::SetPathVariable ( ComplexT const & time) const
inline

Copy the current time value to memory.

Parameters
timeThe current time
Template Parameters
ComplexTthe complex numeric type.

If the SLP doesn't have a path variable, then this will throw.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVariableValues()

template<typename Derived>
void bertini::StraightLineProgram::SetVariableValues ( Eigen::MatrixBase< Derived > const & variable_values) const
inline

Copy the values of the variables from the passed in vector to memory.

Parameters
variable_valuesThe vector of current variable values.
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const StraightLineProgram & s )
friend

Overloaded operator for printing to an arbirtary out stream.


The documentation for this class was generated from the following files: