diff --git a/gtsam/linear/GaussianFactorGraph.cpp b/gtsam/linear/GaussianFactorGraph.cpp index cb118256b..8f7d4234e 100644 --- a/gtsam/linear/GaussianFactorGraph.cpp +++ b/gtsam/linear/GaussianFactorGraph.cpp @@ -47,27 +47,6 @@ namespace gtsam { return keys; } - /* ************************************************************************* */ - std::pair - GaussianFactorGraph::eliminateFrontals(size_t nFrontals) const - { - return FactorGraph::eliminateFrontals(nFrontals, EliminateQR); - } - - /* ************************************************************************* */ - std::pair - GaussianFactorGraph::eliminate(const std::vector& variables) - { - return FactorGraph::eliminate(variables, EliminateQR); - } - - /* ************************************************************************* */ - std::pair - GaussianFactorGraph::eliminateOne(Index variable) - { - return FactorGraph::eliminateOne(variable, EliminateQR); - } - /* ************************************************************************* */ void GaussianFactorGraph::permuteWithInverse( const Permutation& inversePermutation) { diff --git a/gtsam/linear/GaussianFactorGraph.h b/gtsam/linear/GaussianFactorGraph.h index e5b17e599..90086c1e5 100644 --- a/gtsam/linear/GaussianFactorGraph.h +++ b/gtsam/linear/GaussianFactorGraph.h @@ -122,7 +122,8 @@ namespace gtsam { * FactorGraph::eliminateFrontals with EliminateQR as the * eliminate function argument. */ - std::pair eliminateFrontals(size_t nFrontals) const; + std::pair eliminateFrontals(size_t nFrontals, const Eliminate& function) const { + return Base::eliminateFrontals(nFrontals, function); } /** Factor the factor graph into a conditional and a remaining factor graph. * Given the factor graph \f$ f(X) \f$, and \c variables to factorize out @@ -140,10 +141,12 @@ namespace gtsam { * FactorGraph::eliminate with EliminateQR as the eliminate * function argument. */ - std::pair eliminate(const std::vector& variables); + std::pair eliminate(const std::vector& variables, const Eliminate& function) { + return Base::eliminate(variables, function); } /** Eliminate a single variable, by calling GaussianFactorGraph::eliminate. */ - std::pair eliminateOne(Index variable); + std::pair eliminateOne(Index variable, const Eliminate& function) { + return Base::eliminateOne(variable, function); } /** Permute the variables in the factors */ void permuteWithInverse(const Permutation& inversePermutation);