Skip to content

Commit

Permalink
Merge pull request #1370 from borglab/feature/NoiseModelFactorN_undep…
Browse files Browse the repository at this point in the history
…recate
  • Loading branch information
gchenfc authored Jan 5, 2023
2 parents 181e9c4 + 8f2c978 commit 7bd4556
Show file tree
Hide file tree
Showing 19 changed files with 138 additions and 342 deletions.
8 changes: 4 additions & 4 deletions gtsam/inference/graph-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ boost::shared_ptr<Values> composePoses(const G& graph, const PredecessorMap<KEY>
boost::shared_ptr<Factor> factor = boost::dynamic_pointer_cast<Factor>(nl_factor);
if (!factor) continue;

KEY key1 = factor->template key<1>();
KEY key2 = factor->template key<2>();
KEY key1 = factor->key1();
KEY key2 = factor->key2();

PoseVertex v1 = key2vertex.find(key1)->second;
PoseVertex v2 = key2vertex.find(key2)->second;
Expand Down Expand Up @@ -270,8 +270,8 @@ void split(const G& g, const PredecessorMap<KEY>& tree, G& Ab1, G& Ab2) {
FACTOR2>(factor);
if (!factor2) continue;

KEY key1 = factor2->template key<1>();
KEY key2 = factor2->template key<2>();
KEY key1 = factor2->key1();
KEY key2 = factor2->key2();
// if the tree contains the key
if ((tree.find(key1) != tree.end() &&
tree.find(key1)->second.compare(key2) == 0) ||
Expand Down
6 changes: 3 additions & 3 deletions gtsam/nonlinear/FunctorizedFactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class FunctorizedFactor : public NoiseModelFactorN<T> {
const KeyFormatter &keyFormatter = DefaultKeyFormatter) const override {
Base::print(s, keyFormatter);
std::cout << s << (s != "" ? " " : "") << "FunctorizedFactor("
<< keyFormatter(this->template key<1>()) << ")" << std::endl;
<< keyFormatter(this->key1()) << ")" << std::endl;
traits<R>::Print(measured_, " measurement: ");
std::cout << " noise model sigmas: " << noiseModel_->sigmas().transpose()
<< std::endl;
Expand Down Expand Up @@ -208,8 +208,8 @@ class FunctorizedFactor2 : public NoiseModelFactorN<T1, T2> {
const KeyFormatter &keyFormatter = DefaultKeyFormatter) const override {
Base::print(s, keyFormatter);
std::cout << s << (s != "" ? " " : "") << "FunctorizedFactor2("
<< keyFormatter(this->template key<1>()) << ", "
<< keyFormatter(this->template key<2>()) << ")" << std::endl;
<< keyFormatter(this->key1()) << ", "
<< keyFormatter(this->key2()) << ")" << std::endl;
traits<R>::Print(measured_, " measurement: ");
std::cout << " noise model sigmas: " << noiseModel_->sigmas().transpose()
<< std::endl;
Expand Down
Loading

0 comments on commit 7bd4556

Please sign in to comment.