@@ -34,20 +34,15 @@ namespace gtsam {
3434 }
3535
3636 /* ************************************************************************* */
37- template <typename KEYS>
38- JacobianFactor::JacobianFactor (const KEYS& keys,
39- const VerticalBlockMatrix& augmentedMatrix,
37+ template <
38+ typename KEYS, typename MATRIX,
39+ std::enable_if_t <
40+ std::is_same<std::decay_t <MATRIX>, VerticalBlockMatrix>::value, bool >>
41+ JacobianFactor::JacobianFactor (KEYS&& keys, MATRIX&& augmentedMatrix,
4042 const SharedDiagonal& model)
41- : Base(keys), Ab_(augmentedMatrix), model_(model) {
42- checkAb (model, augmentedMatrix);
43- }
44-
45- /* ************************************************************************* */
46- template <typename KEYS>
47- JacobianFactor::JacobianFactor (const KEYS& keys,
48- VerticalBlockMatrix&& augmentedMatrix,
49- const SharedDiagonal& model)
50- : Base(keys), Ab_(std::move(augmentedMatrix)), model_(model) {
43+ : Base(std::forward<KEYS>(keys)),
44+ Ab_ (std::forward<MATRIX>(augmentedMatrix)),
45+ model_(model) {
5146 checkAb (model, Ab_);
5247 }
5348
0 commit comments