diff --git a/gtsam_unstable/linear/LP.h b/gtsam_unstable/linear/LP.h index 50065b2dd..dbb744d3e 100644 --- a/gtsam_unstable/linear/LP.h +++ b/gtsam_unstable/linear/LP.h @@ -81,23 +81,9 @@ public: if (!cachedConstrainedKeyDimMap_.empty()) return cachedConstrainedKeyDimMap_; // Collect key-dim map of all variables in the constraints - //TODO(Varun) seems like the templated function is causing the multiple symbols error on Windows - // cachedConstrainedKeyDimMap_ = collectKeyDim(equalities); - // KeyDimMap keysDim2 = collectKeyDim(inequalities); - // cachedConstrainedKeyDimMap_.insert(keysDim2.begin(), keysDim2.end()); - cachedConstrainedKeyDimMap_.clear(); - for (auto&& factor : equalities) { - if (!factor) continue; - for (Key key : factor->keys()) { - cachedConstrainedKeyDimMap_[key] = factor->getDim(factor->find(key)); - } - } - for (auto&& factor : inequalities) { - if (!factor) continue; - for (Key key : factor->keys()) { - cachedConstrainedKeyDimMap_[key] = factor->getDim(factor->find(key)); - } - } + cachedConstrainedKeyDimMap_ = collectKeyDim(equalities); + KeyDimMap keysDim2 = collectKeyDim(inequalities); + cachedConstrainedKeyDimMap_.insert(keysDim2.begin(), keysDim2.end()); return cachedConstrainedKeyDimMap_; } diff --git a/gtsam_unstable/slam/SmartStereoProjectionFactorPP.h b/gtsam_unstable/slam/SmartStereoProjectionFactorPP.h index b022ce16f..189c501bb 100644 --- a/gtsam_unstable/slam/SmartStereoProjectionFactorPP.h +++ b/gtsam_unstable/slam/SmartStereoProjectionFactorPP.h @@ -252,15 +252,13 @@ class GTSAM_UNSTABLE_EXPORT SmartStereoProjectionFactorPP nonuniqueKeys.push_back(body_P_cam_keys_.at(i)); } // but we need to get the augumented hessian wrt the unique keys in key_ - //TODO(Varun) SchurComplementAndRearrangeBlocks is causing the multiply defined symbol error - // SymmetricBlockMatrix augmentedHessianUniqueKeys = - // Base::Cameras::template SchurComplementAndRearrangeBlocks<3, DimBlock, - // DimPose>( - // Fs, E, P, b, nonuniqueKeys, keys_); + SymmetricBlockMatrix augmentedHessianUniqueKeys = + Base::Cameras::template SchurComplementAndRearrangeBlocks<3, DimBlock, + DimPose>( + Fs, E, P, b, nonuniqueKeys, keys_); - // return std::make_shared>( - // keys_, augmentedHessianUniqueKeys); - return nullptr; + return std::make_shared>( + keys_, augmentedHessianUniqueKeys); } /**