Fix syntax errors

release/4.3a0
p-zach 2025-04-15 23:53:43 -04:00
parent 97b6e879ea
commit 3db7920f65
3 changed files with 15 additions and 15 deletions

View File

@ -23,12 +23,12 @@ namespace gtsam {
using namespace std;
const FactorIndices& operator[](Key variable) const {
KeyMap::const_iterator item = index_.find(variable);
const FactorIndices& VariableIndex::operator[](Key variable) const {
return index_.find(variable)->second;
}
const FactorIndices& at(Key variable) const {
KeyMap::const_iterator item = (*this)[variable];
const FactorIndices& VariableIndex::at(Key variable) const {
KeyMap::const_iterator item = index_.find(variable);
if(item == index_.end())
throw std::invalid_argument("Requested non-existent variable '" +
DefaultKeyFormatter(variable) +
@ -37,7 +37,7 @@ const FactorIndices& at(Key variable) const {
return item->second;
}
bool empty(Key variable) const {
bool VariableIndex::empty(Key variable) const {
return (*this)[variable].empty();
}

View File

@ -199,8 +199,8 @@ class VariableIndex {
VariableIndex(const T& factorGraph);
VariableIndex(const gtsam::VariableIndex& other);
const FactorIndices& at(Key variable) const;
bool empty(Key variable) const;
gtsam::FactorIndices& at(gtsam::Key variable) const;
bool empty(gtsam::Key variable) const;
// Testable
bool equals(const gtsam::VariableIndex& other, double tol) const;

View File

@ -689,16 +689,16 @@ virtual class GaussianBayesTree {
#include <gtsam/linear/GaussianEliminationTree.h>
virtual class GaussianEliminationTree {
GaussianEliminationTree(const GaussianFactorGraph& factorGraph,
const VariableIndex& structure, const Ordering& order);
GaussianEliminationTree(const GaussianFactorGraph& factorGraph,
const Ordering& order);
GaussianEliminationTree(const gtsam::GaussianFactorGraph& factorGraph,
const gtsam::VariableIndex& structure, const gtsam::Ordering& order);
GaussianEliminationTree(const gtsam::GaussianFactorGraph& factorGraph,
const gtsam::Ordering& order);
bool GaussianEliminationTree::equals(const This& other, double tol) const;
bool equals(const This& other, double tol) const;
void print(const std::string& name = "GaussianEliminationTree: ",
const KeyFormatter& formatter = DefaultKeyFormatter) const;
}
void print(const string name = "GaussianEliminationTree: ",
const gtsam::KeyFormatter& formatter = gtsam::DefaultKeyFormatter) const;
};
#include <gtsam/linear/GaussianISAM.h>
class GaussianISAM {