TVM  0.9.2
tvm::utils::UpdatelessFunction Class Reference

#include <tvm/utils/UpdatelessFunction.h>

Public Member Functions

 UpdatelessFunction (FunctionPtr f)
 
const VariableVectorvariables () const noexcept
 
const FunctionPtrfunction () const noexcept
 
template<typename... Vals>
const Eigen::VectorXd & value (Vals &&... vals) const
 
template<typename... Vals>
tvm::internal::MatrixConstRefWithProperties jacobian (const Variable &x, Vals &&... vals) const
 
template<typename... Vals>
const Eigen::VectorXd & velocity (Vals &&... vals) const
 
template<typename... Vals>
const Eigen::VectorXd & normalAcceleration (Vals &&... vals) const
 
template<typename... Vals>
tvm::internal::MatrixConstRefWithProperties JDot (const Variable &x, Vals &&... vals) const
 

Detailed Description

This class wraps a function to mask the update mechanism to the user, by providing methods as value and jacobian that can be called directly with the values of the variables. It is meant for diagnostic and debugging purposes.

Constructor & Destructor Documentation

◆ UpdatelessFunction()

tvm::utils::UpdatelessFunction::UpdatelessFunction ( FunctionPtr  f)

Constructor with the function to be wrapped.

Member Function Documentation

◆ function()

const FunctionPtr& tvm::utils::UpdatelessFunction::function ( ) const
inlinenoexcept

Get the function associated to this function

◆ jacobian()

template<typename... Vals>
tvm::internal::MatrixConstRefWithProperties tvm::utils::UpdatelessFunction::jacobian ( const Variable x,
Vals &&...  vals 
) const
inline

Get the jacobian matrix with respect to x, for the given variable values. See value for an explanation of how to specify the values.

◆ JDot()

template<typename... Vals>
tvm::internal::MatrixConstRefWithProperties tvm::utils::UpdatelessFunction::JDot ( const Variable x,
Vals &&...  vals 
) const
inline

Get the time derivative of the jacobian matrix with respect to variable x, for the given variable values and velocities. See velocity for an explanation of how to specify the values and velocities.

◆ normalAcceleration()

template<typename... Vals>
const Eigen::VectorXd & tvm::utils::UpdatelessFunction::normalAcceleration ( Vals &&...  vals) const
inline

Get the normalAcceleration, for the given variable values and velocities. See velocity for an explanation of how to specify the values and velocities.

◆ value()

template<typename... Vals>
const Eigen::VectorXd & tvm::utils::UpdatelessFunction::value ( Vals &&...  vals) const
inline

Get the value of the function for given values of its variables. Variable values can be given as VectorXd, or as std::initializer_list. There are three possible syntaxes:

  • value(val1, val2, ..., valn) where val1, ..., valn are the values of the n variables of the function, in the order they are stored in the function (i.e. the order of the vector returned by variables() )
  • value(xi1, vali1, xi2, vali2, ...) where one alternates a reference to one variable and its value. The number of variables in this case need not be n (unspecified variables will keep their previous value), and if a variable is given multiple times, only the last value will be used
  • value(val) where val is a concatenated value for all variables in the order they are stored in the function.

◆ variables()

const VariableVector& tvm::utils::UpdatelessFunction::variables ( ) const
inlinenoexcept

Get the variables in this function

◆ velocity()

template<typename... Vals>
const Eigen::VectorXd & tvm::utils::UpdatelessFunction::velocity ( Vals &&...  vals) const
inline

Get the velocity of the function for given values and velocities of its variables. The values and velocities can be given as VectorXd, or as std::initializer_list. There are three possible syntaxes:

  • velocity(val1, vel1, val2, vel2, ..., valn, veln) where val1, ..., valn are the values of the n variables of the function, in the order they are stored in the function (i.e. the order of the vector returned by variables()) and vel1, ... veln are the corresponding velocities.
  • velocity(xi1, vali1, veli1, xi2, vali2, veli2, ...) where one alternates a reference to one variable and its value and velocity. The number of variables in this case need not be n (unspecified variables will keep their previous value), and if a variable is given multiple times, only the last value will be used
  • velocity(val, vel) where val and vel are the concatenated values and velocities for all variables in the order they are stored in the function.

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