#include <OptionalJacobian.h>
Public Types | |
typedef Eigen::Matrix< double, Rows, Cols > | Jacobian |
Public Member Functions | |
template<int N> | |
OptionalJacobian< Rows, N > | cols (int startCol) |
operator bool () const | |
Return true if allocated, false if default constructor was used. More... | |
Eigen::Map< Jacobian > & | operator* () |
De-reference, like boost optional. More... | |
Eigen::Map< Jacobian > * | operator-> () |
operator->() More... | |
OptionalJacobian () | |
Default constructor. More... | |
OptionalJacobian (const std::optional< std::reference_wrapper< Eigen::MatrixXd >> optional) | |
Constructor compatible with old-style derivatives. More... | |
OptionalJacobian (Eigen::MatrixXd &dynamic) | |
Constructor that will resize a dynamic matrix (unless already correct) More... | |
OptionalJacobian (Eigen::MatrixXd *dynamic) | |
Constructor that will resize a dynamic matrix (unless already correct) More... | |
template<class MATRIX > | |
OptionalJacobian (Eigen::Ref< MATRIX > dynamic_ref) | |
Constructor from an Eigen::Ref value. Will not usurp if dimension is wrong. More... | |
OptionalJacobian (Jacobian &fixed) | |
Constructor that will usurp data of a fixed-size matrix. More... | |
OptionalJacobian (Jacobian *fixedPtr) | |
Constructor that will usurp data of a fixed-size matrix, pointer version. More... | |
OptionalJacobian (std::nullopt_t) | |
Constructor with std::nullopt just makes empty. More... | |
OptionalJacobian (std::nullptr_t) | |
Private Member Functions | |
OptionalJacobian (double *data) | |
void | usurp (double *data) |
View on constructor argument, if given. More... | |
Private Attributes | |
Eigen::Map< Jacobian > | map_ |
Friends | |
template<int M, int N> | |
class | OptionalJacobian |
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size or dynamic Eigen matrix. In the latter case, the dynamic matrix will be resized. Below this class, a dynamic version is also implemented.
Definition at line 38 of file OptionalJacobian.h.
typedef Eigen::Matrix<double, Rows, Cols> gtsam::OptionalJacobian< Rows, Cols >::Jacobian |
Jacobian size type TODO(frank): how to enforce RowMajor? Or better, make it work with any storage order?
Definition at line 44 of file OptionalJacobian.h.
|
inlineprivate |
Definition at line 57 of file OptionalJacobian.h.
|
inline |
Default constructor.
Definition at line 67 of file OptionalJacobian.h.
|
inline |
Default constructor with nullptr_t To guide the compiler when nullptr is passed to args of the type OptionalJacobian
Definition at line 74 of file OptionalJacobian.h.
|
inline |
Constructor that will usurp data of a fixed-size matrix.
Definition at line 79 of file OptionalJacobian.h.
|
inline |
Constructor that will usurp data of a fixed-size matrix, pointer version.
Definition at line 85 of file OptionalJacobian.h.
|
inline |
Constructor that will resize a dynamic matrix (unless already correct)
Definition at line 92 of file OptionalJacobian.h.
|
inline |
Constructor that will resize a dynamic matrix (unless already correct)
Definition at line 99 of file OptionalJacobian.h.
|
inline |
Constructor from an Eigen::Ref value. Will not usurp if dimension is wrong.
Definition at line 112 of file OptionalJacobian.h.
|
inline |
Constructor with std::nullopt just makes empty.
Definition at line 126 of file OptionalJacobian.h.
|
inline |
Constructor compatible with old-style derivatives.
Definition at line 131 of file OptionalJacobian.h.
|
inline |
Access M*N sub-block if we are allocated, otherwise none TODO(frank): this could work as is below if only constructor above worked Access Rows*N sub-block if we are allocated, otherwise return an empty OptionalJacobian The use case is functions with arguments that are dissected, e.g. Pose3 into Rot3, Point3 TODO(frank): ideally, we'd like full block functionality, but see note above.
Definition at line 172 of file OptionalJacobian.h.
|
inline |
Return true if allocated, false if default constructor was used.
Constructor that will usurp data of a block expression TODO(frank): unfortunately using a Map makes usurping non-contiguous memory impossible
Definition at line 144 of file OptionalJacobian.h.
|
inline |
De-reference, like boost optional.
Definition at line 149 of file OptionalJacobian.h.
|
inline |
Definition at line 154 of file OptionalJacobian.h.
|
inlineprivate |
View on constructor argument, if given.
Definition at line 52 of file OptionalJacobian.h.
Definition at line 62 of file OptionalJacobian.h.
|
private |
Definition at line 48 of file OptionalJacobian.h.