Go to the documentation of this file.
23 #include <gtsam/config.h>
24 #include <Eigen/Dense>
37 template<
int Rows,
int Cols>
61 template<
int M,
int N>
94 dynamic.resize(Rows,
Cols);
95 usurp(dynamic.data());
102 dynamic->resize(Rows,
Cols);
103 usurp(dynamic->data());
111 template<
class MATRIX>
114 if (dynamic_ref.rows() == Rows && dynamic_ref.cols() ==
Cols && !dynamic_ref.IsRowMajor) {
115 usurp(dynamic_ref.data());
117 throw std::invalid_argument(
118 std::string(
"OptionalJacobian called with wrong dimensions or "
121 "(" + std::to_string(Rows) +
", " + std::to_string(
Cols) +
")");
134 optional->get().resize(Rows,
Cols);
135 usurp(optional->get().data());
144 operator bool()
const {
145 return map_.data() !=
nullptr;
221 if (optional) pointer_ = &((*optional).get());
225 operator bool()
const {
226 return pointer_!=
nullptr;
239 template <
typename T>
struct traits;
246 template <
class T,
class A>
257 template<
class T,
class A>
Namespace containing all symbols from the Eigen library.
OptionalJacobian(std::nullopt_t)
Constructor with std::nullopt just makes empty.
OptionalJacobian(const std::optional< std::reference_wrapper< Eigen::MatrixXd >> optional)
Constructor compatible with old-style derivatives.
: meta-function to generate Jacobian
OptionalJacobian(Jacobian &fixed)
Constructor that will usurp data of a fixed-size matrix.
Jacobian * operator->()
TODO: operator->()
OptionalJacobian(Jacobian *pointer)
Construct from pointer to dynamic matrix.
OptionalJacobian(Eigen::MatrixXd *dynamic)
Constructor that will resize a dynamic matrix (unless already correct)
OptionalJacobian()
View on constructor argument, if given.
Jacobian & operator*()
De-reference, like boost optional.
Eigen::Map< Jacobian > map_
OptionalJacobian< traits< T >::dimension, traits< A >::dimension > type
OptionalJacobian(Eigen::MatrixXd &dynamic)
Constructor that will resize a dynamic matrix (unless already correct)
Eigen::MatrixXd Jacobian
Jacobian size type.
OptionalJacobian(const std::optional< std::reference_wrapper< Eigen::MatrixXd >> optional)
Constructor for optional matrix reference.
OptionalJacobian(Eigen::Ref< MATRIX > dynamic_ref)
Constructor from an Eigen::Ref value. Will not usurp if dimension is wrong.
A matrix or vector expression mapping an existing array of data.
void usurp(double *data)
View on constructor argument, if given.
Eigen::Matrix< double, traits< T >::dimension, traits< A >::dimension > type
OptionalJacobian()
Default constructor.
Eigen::Map< Jacobian > * operator->()
operator->()
OptionalJacobian(Jacobian &dynamic)
Construct from refrence to dynamic matrix.
OptionalJacobian< Rows, N > cols(int startCol)
A matrix or vector expression mapping an existing expression.
OptionalJacobian(std::nullopt_t)
Constructor with std::nullopt just makes empty.
Eigen::Map< Jacobian > & operator*()
De-reference, like boost optional.
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
The matrix class, also used for vectors and row-vectors.
Eigen::Matrix< double, Rows, Cols > Jacobian
OptionalJacobian(double *data)
OptionalJacobian(std::nullptr_t)
OptionalJacobian(Jacobian *fixedPtr)
Constructor that will usurp data of a fixed-size matrix, pointer version.
: meta-function to generate JacobianTA optional reference Used mainly by Expressions
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:12:24