32 template<
int M,
int N1,
int N2>
37 Key key2,
const Eigen::Matrix<double, M, N2>& A2,
38 const Eigen::Matrix<double, M, 1>& b,
39 const SharedDiagonal& model = SharedDiagonal()) :
43 inline Key key1()
const {
46 inline Key key2()
const {
53 gttic(updateHessian_BinaryJacobianFactor);
55 const SharedDiagonal& model =
get_model();
56 if (model && !model->isUnit()) {
57 if (model->isConstrained())
58 throw std::invalid_argument(
59 "BinaryJacobianFactor::updateHessian: cannot update information with " 60 "constrained noise model");
62 key2(), model->Whiten(
getA(
end())), model->whiten(
getb()));
70 const Matrix& Ab = Ab_.
matrix();
71 Eigen::Block<const Matrix, M, N1> A1(Ab, 0, 0);
72 Eigen::Block<const Matrix, M, N2> A2(Ab, 0, N1);
73 Eigen::Block<const Matrix, M, 1> b(Ab, 0, N1 + N2);
86 template<
int M,
int N1,
int N2>
88 BinaryJacobianFactor<M, N1, N2> > {
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition: types.h:63
const constBVector getb() const
Get a view of the r.h.s.
Definition: JacobianFactor.h:264
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
constABlock getA() const
Get a view of the A matrix, not weighted by noise.
Definition: JacobianFactor.h:270
Access to matrices via blocks of pre-defined sizes.
A binary JacobianFactor specialization that uses fixed matrix math for speed.
Definition: BinaryJacobianFactor.h:33
void updateHessian(const KeyVector &infoKeys, SymmetricBlockMatrix *info) const
Update an information matrix by adding the information corresponding to this factor (used internally ...
Definition: BinaryJacobianFactor.h:51
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:56
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Eigen::SelfAdjointView< Block, Eigen::Upper > diagonalBlock(DenseIndex J)
Return the J'th diagonal block as a self adjoint view.
Definition: SymmetricBlockMatrix.h:140
A Gaussian factor in the squared-error form.
Definition: JacobianFactor.h:87
Definition: SymmetricBlockMatrix.h:51
const Matrix & matrix() const
Access to full matrix (including any portions excluded by rowStart(), rowEnd(), and firstBlock())
Definition: VerticalBlockMatrix.h:187
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
KeyVector keys_
The keys involved in this factor.
Definition: Factor.h:72
BinaryJacobianFactor(Key key1, const Eigen::Matrix< double, M, N1 > &A1, Key key2, const Eigen::Matrix< double, M, N2 > &A2, const Eigen::Matrix< double, M, 1 > &b, const SharedDiagonal &model=SharedDiagonal())
Constructor.
Definition: BinaryJacobianFactor.h:36
void updateOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr)
Update an off diagonal block.
Definition: SymmetricBlockMatrix.h:233
DenseIndex nBlocks() const
Block count.
Definition: SymmetricBlockMatrix.h:125
void updateDiagonalBlock(DenseIndex I, const XprType &xpr)
Increment the diagonal block by the values in xpr. Only reads the upper triangular part of xpr.
Definition: SymmetricBlockMatrix.h:217
const_iterator begin() const
Iterator at beginning of involved variable keys.
Definition: Factor.h:121
const_iterator end() const
Iterator at end of involved variable keys.
Definition: Factor.h:124
const SharedDiagonal & get_model() const
get a copy of model
Definition: JacobianFactor.h:258