26 template<
typename TERMS>
33 template<
typename KEYS>
36 Base(keys), Ab_(augmentedMatrix)
44 throw std::invalid_argument(
45 "Error in JacobianFactor constructor input. Number of provided keys plus\n" 46 "one for the RHS vector must equal the number of provided matrix blocks.");
49 if(augmentedMatrix(augmentedMatrix.
nBlocks() - 1).
cols() != 1)
50 throw std::invalid_argument(
51 "Error in JacobianFactor constructor input. The last provided matrix block\n" 52 "must be the RHS vector, but the last provided block had more than one column.");
59 template<
typename TERMS>
63 if(noiseModel && (
DenseIndex)noiseModel->dim() != b.size())
70 std::vector<size_t> dimensions;
71 dimensions.reserve(terms.size());
72 for(
typename TERMS::const_iterator it = terms.begin(); it != terms.end(); ++it) {
73 const std::pair<Key, Matrix>& term = *it;
74 const Matrix& Ai = term.second;
75 dimensions.push_back(Ai.cols());
83 for(
typename TERMS::const_iterator it = terms.begin(); it != terms.end(); ++it) {
84 const std::pair<Key, Matrix>& term = *it;
86 const Matrix& Ai = term.second;
89 if(Ai.rows() != Ab_.
rows())
Definition: VerticalBlockMatrix.h:42
DenseIndex nBlocks() const
Block count.
Definition: VerticalBlockMatrix.h:121
DenseIndex rows() const
Row size.
Definition: VerticalBlockMatrix.h:115
KeyVector keys_
The keys involved in this factor.
Definition: Factor.h:87
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition: types.h:108
Definition: GaussianFactor.h:38
const constBVector getb() const
Definition: JacobianFactor.h:298
void fillTerms(const TERMS &terms, const Vector &b, const SharedDiagonal &noiseModel)
Internal function to fill blocks and set dimensions.
Definition: JacobianFactor-inl.h:60
Exceptions that may be thrown by linear solver components.
Definition: chartTesting.h:28
Definition: linearExceptions.h:106
size_t cols() const
Definition: JacobianFactor.h:289
const KeyVector & keys() const
Access the factor's involved variable keys.
Definition: Factor.h:142
Definition: linearExceptions.h:121
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102