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())
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;
void fillTerms(const TERMS &terms, const Vector &b, const SharedDiagonal &noiseModel)
Internal function to fill blocks and set dimensions.
noiseModel::Diagonal::shared_ptr model
noiseModel::Diagonal::shared_ptr model_
KeyVector keys_
The keys involved in this factor.
vector< size_t > dimensions(L.begin(), L.end())
ptrdiff_t DenseIndex
The index type for Eigen objects.
DenseIndex nBlocks() const
Block count.
const constBVector getb() const
Exceptions that may be thrown by linear solver components.
noiseModel::Diagonal::shared_ptr SharedDiagonal
const KeyVector & keys() const
Access the factor's involved variable keys.
std::uint64_t Key
Integer nonlinear key type.
DenseIndex rows() const
Row size.