Go to the documentation of this file.
21 #include <gtsam/config.h>
31 #include <type_traits>
36 template<
int T>
struct CallRecord;
50 template<
bool UseBlock,
typename Derived>
55 jacobians(
key).block<Derived::RowsAtCompileTime, Derived::ColsAtCompileTime>(
61 template<
typename Derived>
65 jacobians(
key) += dTdA;
70 template<
typename Derived>
75 && Derived::ColsAtCompileTime !=
Eigen::Dynamic, Derived>::addToJacobian(
76 dTdA, jacobians,
key);
101 class ExecutionTrace {
132 void print(
const std::string& indent =
"")
const {
134 std::cout << indent <<
"Constant" << std::endl;
136 std::cout << indent <<
"Leaf, key = " <<
content.key << std::endl;
138 content.ptr->print(indent +
" ");
143 template<
class Record>
149 return p ? std::optional<Record*>(
p) : std::nullopt;
160 static const JacobianTT I = JacobianTT::Identity();
165 content.ptr->startReverseAD2(jacobians);
173 template<
typename DerivedMatrix>
179 content.ptr->reverseAD2(dTdA, jacobians);
union gtsam::internal::ExecutionTrace::@1098 content
void setLeaf(Key key)
Change pointer to a Leaf Record.
std::optional< Record * > record()
Return record pointer, quite unsafe, used only for testing.
ExecutionTrace()
Pointer always starts out as a Constant.
static void addToJacobian(const Eigen::MatrixBase< Derived > &dTdA, JacobianMap &jacobians, Key key)
static const unsigned TraceAlignment
void reverseAD1(const Eigen::MatrixBase< DerivedMatrix > &dTdA, JacobianMap &jacobians) const
Either add to Jacobians (Leaf) or propagate (Function)
ExecutionTrace< T > type
Define type so we can apply it as a meta-function.
JacobianMap for returning derivatives from expressions.
static void addToJacobian(const Eigen::MatrixBase< Derived > &dTdA, JacobianMap &jacobians, Key key)
void handleLeafCase(const Eigen::MatrixBase< Derived > &dTdA, JacobianMap &jacobians, Key key)
Handle Leaf Case: reverse AD ends here, by writing a matrix into Jacobians.
void startReverseAD1(JacobianMap &jacobians) const
enum gtsam::internal::ExecutionTrace::@1097 kind
std::aligned_storage< 1, TraceAlignment >::type ExecutionTraceStorage
Base class and basic functions for Manifold types.
Eigen::Matrix< double, Dim, Dim > JacobianTT
void print(const std::string &indent="") const
Print.
const gtsam::Symbol key('X', 0)
void setFunction(CallRecord< Dim > *record)
Take ownership of pointer to a Function Record.
The matrix class, also used for vectors and row-vectors.
Base class for all dense matrices, vectors, and expressions.
std::uint64_t Key
Integer nonlinear key type.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:31