26template<
size_t D,
size_t ZDim>
30 typedef Eigen::Matrix<double, ZDim, D> MatrixZD;
31 typedef std::pair<Key, Matrix> KeyMatrix;
41 const SharedDiagonal& model = SharedDiagonal()) :
43 Matrix zeroMatrix = Matrix::Zero(0, D);
44 Vector zeroVector = Vector::Zero(0);
45 std::vector<KeyMatrix> QF;
46 QF.reserve(
keys.size());
48 QF.push_back(KeyMatrix(key, zeroMatrix));
54 const std::vector<MatrixZD, Eigen::aligned_allocator<MatrixZD> >& FBlocks,
const Matrix& E,
const Matrix3& P,
55 const Vector& b,
const SharedDiagonal& model = SharedDiagonal()) :
57 size_t j = 0, m2 = E.rows(), m = m2 / ZDim;
59 Matrix Q = Matrix::Identity(m2,m2) - E * P * E.transpose();
62 std::vector<KeyMatrix> QF;
65 for (
size_t k = 0; k < FBlocks.size(); ++k) {
68 KeyMatrix(key, - Q.block(0, ZDim * j++, m2, ZDim) * FBlocks[k]));
78 JacobianFactorQ<D, ZDim> > {
JacobianFactor class with fixed sized blcoks.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:86
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:69
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:151
This is the base class for all factor types.
Definition: Factor.h:56
const KeyVector & keys() const
Access the factor's involved variable keys.
Definition: Factor.h:125
void fillTerms(const TERMS &terms, const Vector &b, const SharedDiagonal &noiseModel)
Internal function to fill blocks and set dimensions.
Definition: JacobianFactor-inl.h:60
JacobianFactor with constant sized blocks Provides raw memory access versions of linear operator.
Definition: RegularJacobianFactor.h:32
JacobianFactor for Schur complement that uses Q noise model.
Definition: JacobianFactorQ.h:27
JacobianFactorQ()
Default constructor.
Definition: JacobianFactorQ.h:36
JacobianFactorQ(const KeyVector &keys, const std::vector< MatrixZD, Eigen::aligned_allocator< MatrixZD > > &FBlocks, const Matrix &E, const Matrix3 &P, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
Constructor.
Definition: JacobianFactorQ.h:53
JacobianFactorQ(const KeyVector &keys, const SharedDiagonal &model=SharedDiagonal())
Empty constructor with keys.
Definition: JacobianFactorQ.h:40