7#include <Eigen/SparseCore>
43 : m_jacobian{variable, wrt} {}
56 const Eigen::SparseVector<double>&
Value() {
57 m_g = m_jacobian.Value();
68 Eigen::SparseVector<double> m_g;
#define SLEIPNIR_DLLEXPORT
Definition SymbolExports.hpp:34
This class calculates the gradient of a a variable with respect to a vector of variables.
Definition Gradient.hpp:24
const Eigen::SparseVector< double > & Value()
Evaluates the gradient at wrt's value.
Definition Gradient.hpp:56
Gradient(Variable variable, const VariableMatrix &wrt) noexcept
Constructs a Gradient object.
Definition Gradient.hpp:42
Gradient(Variable variable, Variable wrt) noexcept
Constructs a Gradient object.
Definition Gradient.hpp:32
Profiler & GetProfiler()
Returns the profiler.
Definition Gradient.hpp:65
VariableMatrix Get() const
Returns the gradient as a VariableMatrix.
Definition Gradient.hpp:51
This class calculates the Jacobian of a vector of variables with respect to a vector of variables.
Definition Jacobian.hpp:25
Records the number of profiler measurements (start/stop pairs) and the average duration between each ...
Definition Profiler.hpp:15
An autodiff variable pointing to an expression node.
Definition Variable.hpp:31
A matrix of autodiff variables.
Definition VariableMatrix.hpp:28
VariableMatrix T() const
Returns the transpose of the variable matrix.
Definition VariableMatrix.hpp:738
Definition Hessian.hpp:18