33 template<
bool ConvertToDynamicRows>
35 template<
typename Derived>
36 static Eigen::Matrix<double, Eigen::Dynamic, Derived::ColsAtCompileTime> convert(
37 const Eigen::MatrixBase<Derived>& x) {
44 template<
typename Derived>
45 static const Eigen::Matrix<double, Derived::RowsAtCompileTime,
46 Derived::ColsAtCompileTime> convert(
47 const Eigen::MatrixBase<Derived> & x) {
51 template <
int Rows,
int Cols>
52 static const Eigen::Matrix<double, Rows, Cols>& convert(
53 const Eigen::Matrix<double, Rows, Cols>& x) {
72 inline void print(
const std::string& indent)
const {
81 inline void startReverseAD2(
JacobianMap& jacobians)
const {
82 _startReverseAD3(jacobians);
89 template <
typename Derived>
90 inline void reverseAD2(
const Eigen::MatrixBase<Derived>& dFdT,
JacobianMap& jacobians)
const {
91 _reverseAD3(
ConvertToDynamicIf<(Derived::RowsAtCompileTime > 5)>::convert(dFdT), jacobians);
97 inline void reverseAD2(
const Matrix & dFdT,
JacobianMap& jacobians)
const {
98 _reverseAD3(dFdT, jacobians);
106 virtual void _print(
const std::string& indent)
const = 0;
107 virtual void _startReverseAD3(
JacobianMap& jacobians)
const = 0;
109 virtual void _reverseAD3(
const Matrix & dFdT,
112 virtual void _reverseAD3(
113 const Eigen::Matrix<double, Eigen::Dynamic, Cols> & dFdT,
116 virtual void _reverseAD3(
const Eigen::Matrix<double, 1, Cols> & dFdT,
118 virtual void _reverseAD3(
const Eigen::Matrix<double, 2, Cols> & dFdT,
120 virtual void _reverseAD3(
const Eigen::Matrix<double, 3, Cols> & dFdT,
122 virtual void _reverseAD3(
const Eigen::Matrix<double, 4, Cols> & dFdT,
124 virtual void _reverseAD3(
const Eigen::Matrix<double, 5, Cols> & dFdT,
139 template<
typename Derived,
int Cols>
143 const Derived & derived()
const {
144 return static_cast<const Derived&
>(*this);
147 void _print(
const std::string& indent)
const override {
148 derived().print(indent);
153 void _startReverseAD3(
JacobianMap& jacobians)
const override {
154 derived().startReverseAD4(jacobians);
157 void _reverseAD3(
const Matrix & dFdT,
JacobianMap& jacobians)
const override {
158 derived().reverseAD4(dFdT, jacobians);
162 const Eigen::Matrix<double, Eigen::Dynamic, Cols> & dFdT,
164 derived().reverseAD4(dFdT, jacobians);
166 void _reverseAD3(
const Eigen::Matrix<double, 1, Cols> & dFdT,
168 derived().reverseAD4(dFdT, jacobians);
170 void _reverseAD3(
const Eigen::Matrix<double, 2, Cols> & dFdT,
172 derived().reverseAD4(dFdT, jacobians);
174 void _reverseAD3(
const Eigen::Matrix<double, 3, Cols> & dFdT,
176 derived().reverseAD4(dFdT, jacobians);
178 void _reverseAD3(
const Eigen::Matrix<double, 4, Cols> & dFdT,
180 derived().reverseAD4(dFdT, jacobians);
182 void _reverseAD3(
const Eigen::Matrix<double, 5, Cols> & dFdT,
184 derived().reverseAD4(dFdT, jacobians);
Definition: CallRecord.h:34
JacobianMap for returning derivatives from expressions.
Definition: JacobianMap.h:32
Definition: CallRecord.h:69
GTSAM_EXPORT void print(const Matrix &A, const std::string &s, std::ostream &stream)
Definition: chartTesting.h:28
const int CallRecordMaxVirtualStaticRows
Definition: CallRecord.h:133
Definition: CallRecord.h:140