7#include <Eigen/SparseCore>
33 : m_jacobian{std::move(variable), std::move(wrt)} {}
43 : m_jacobian{
VariableMatrix{std::move(variable)}, std::move(wrt)} {}
60 const Eigen::SparseVector<double>&
value() {
61 m_g = m_jacobian.value();
67 Eigen::SparseVector<double> m_g;
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:60
VariableMatrix get() const
Returns the gradient as a VariableMatrix.
Definition gradient.hpp:53
Gradient(Variable variable, SleipnirMatrixLike auto wrt) noexcept
Constructs a Gradient object.
Definition gradient.hpp:42
Gradient(Variable variable, Variable wrt) noexcept
Constructs a Gradient object.
Definition gradient.hpp:32
This class calculates the Jacobian of a vector of variables with respect to a vector of variables.
Definition jacobian.hpp:25
An autodiff variable pointing to an expression node.
Definition variable.hpp:40
A matrix of autodiff variables.
Definition variable_matrix.hpp:29
VariableMatrix T() const
Returns the transpose of the variable matrix.
Definition variable_matrix.hpp:897
Definition concepts.hpp:30
Definition expression_graph.hpp:11
#define SLEIPNIR_DLLEXPORT
Definition symbol_exports.hpp:34