Sleipnir C++ API
Loading...
Searching...
No Matches
slp::Jacobian Class Reference

#include <sleipnir/autodiff/jacobian.hpp>

Public Member Functions

 Jacobian (Variable variable, Variable wrt) noexcept
 
 Jacobian (VariableMatrix variables, SleipnirMatrixLike auto wrt) noexcept
 
VariableMatrix get () const
 
const Eigen::SparseMatrix< double > & value ()
 
const small_vector< SolveProfiler > & get_profilers () const
 

Detailed Description

This class calculates the Jacobian of a vector of variables with respect to a vector of variables.

The Jacobian is only recomputed if the variable expression is quadratic or higher order.

Constructor & Destructor Documentation

◆ Jacobian() [1/2]

slp::Jacobian::Jacobian ( Variable  variable,
Variable  wrt 
)
inlinenoexcept

Constructs a Jacobian object.

Parameters
variableVariable of which to compute the Jacobian.
wrtVariable with respect to which to compute the Jacobian.

◆ Jacobian() [2/2]

slp::Jacobian::Jacobian ( VariableMatrix  variables,
SleipnirMatrixLike auto  wrt 
)
inlinenoexcept

Constructs a Jacobian object.

Parameters
variablesVector of variables of which to compute the Jacobian.
wrtVector of variables with respect to which to compute the Jacobian.

Member Function Documentation

◆ get()

VariableMatrix slp::Jacobian::get ( ) const
inline

Returns the Jacobian as a VariableMatrix.

This is useful when constructing optimization problems with derivatives in them.

Returns
The Jacobian as a VariableMatrix.

◆ get_profilers()

const small_vector< SolveProfiler > & slp::Jacobian::get_profilers ( ) const
inline

Returns the profilers.

Returns
The profilers.

◆ value()

const Eigen::SparseMatrix< double > & slp::Jacobian::value ( )
inline

Evaluates the Jacobian at wrt's value.

Returns
The Jacobian at wrt's value.

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