diff --git a/gtsam/inference/GenericMultifrontalSolver-inl.h b/gtsam/inference/GenericMultifrontalSolver-inl.h index dc9e67ad2..eab48f108 100644 --- a/gtsam/inference/GenericMultifrontalSolver-inl.h +++ b/gtsam/inference/GenericMultifrontalSolver-inl.h @@ -35,11 +35,6 @@ template GenericMultifrontalSolver::GenericMultifrontalSolver(const FactorGraph& factorGraph) : structure_(new VariableIndex(factorGraph)), junctionTree_(new JUNCTIONTREE(factorGraph, *structure_)) {} -/* ************************************************************************* */ -template -GenericMultifrontalSolver::GenericMultifrontalSolver(const typename FactorGraph::shared_ptr& factorGraph) : - structure_(new VariableIndex(*factorGraph)), junctionTree_(new JUNCTIONTREE(*factorGraph, *structure_)) {} - /* ************************************************************************* */ template GenericMultifrontalSolver::GenericMultifrontalSolver( diff --git a/gtsam/inference/GenericMultifrontalSolver.h b/gtsam/inference/GenericMultifrontalSolver.h index d23773b52..8ad85bee1 100644 --- a/gtsam/inference/GenericMultifrontalSolver.h +++ b/gtsam/inference/GenericMultifrontalSolver.h @@ -45,12 +45,6 @@ public: */ GenericMultifrontalSolver(const FactorGraph& factorGraph); - /** - * Construct the solver for a factor graph. This builds the junction - * tree, which already does some of the work of elimination. - */ - GenericMultifrontalSolver(const typename FactorGraph::shared_ptr& factorGraph); - /** * Construct the solver with a shared pointer to a factor graph and to a * VariableIndex. The solver will store these pointers, so this constructor diff --git a/gtsam/inference/GenericSequentialSolver-inl.h b/gtsam/inference/GenericSequentialSolver-inl.h index 1530113d7..2f6a3ac73 100644 --- a/gtsam/inference/GenericSequentialSolver-inl.h +++ b/gtsam/inference/GenericSequentialSolver-inl.h @@ -34,12 +34,6 @@ GenericSequentialSolver::GenericSequentialSolver(const FactorGraph(factorGraph)), structure_(new VariableIndex(factorGraph)), eliminationTree_(EliminationTree::Create(*factors_, *structure_)) {} -/* ************************************************************************* */ -template -GenericSequentialSolver::GenericSequentialSolver(const typename FactorGraph::shared_ptr& factorGraph) : - factors_(factorGraph), structure_(new VariableIndex(*factorGraph)), - eliminationTree_(EliminationTree::Create(*factors_, *structure_)) {} - /* ************************************************************************* */ template GenericSequentialSolver::GenericSequentialSolver(const typename FactorGraph::shared_ptr& factorGraph, diff --git a/gtsam/inference/GenericSequentialSolver.h b/gtsam/inference/GenericSequentialSolver.h index b1671261e..5f2fbc9a3 100644 --- a/gtsam/inference/GenericSequentialSolver.h +++ b/gtsam/inference/GenericSequentialSolver.h @@ -48,12 +48,6 @@ public: */ GenericSequentialSolver(const FactorGraph& factorGraph); - /** - * Construct the solver for a factor graph. This builds the elimination - * tree, which already does some of the work of elimination. - */ - GenericSequentialSolver(const typename FactorGraph::shared_ptr& factorGraph); - /** * Construct the solver with a shared pointer to a factor graph and to a * VariableIndex. The solver will store these pointers, so this constructor diff --git a/gtsam/linear/GaussianMultifrontalSolver.cpp b/gtsam/linear/GaussianMultifrontalSolver.cpp index 80d00b3b6..547cc3024 100644 --- a/gtsam/linear/GaussianMultifrontalSolver.cpp +++ b/gtsam/linear/GaussianMultifrontalSolver.cpp @@ -30,10 +30,6 @@ namespace gtsam { GaussianMultifrontalSolver::GaussianMultifrontalSolver(const FactorGraph& factorGraph) : Base(factorGraph) {} -/* ************************************************************************* */ -GaussianMultifrontalSolver::GaussianMultifrontalSolver(const FactorGraph::shared_ptr& factorGraph) : - Base(factorGraph) {} - /* ************************************************************************* */ GaussianMultifrontalSolver::GaussianMultifrontalSolver(const FactorGraph::shared_ptr& factorGraph, const VariableIndex::shared_ptr& variableIndex) : Base(factorGraph, variableIndex) {} diff --git a/gtsam/linear/GaussianMultifrontalSolver.h b/gtsam/linear/GaussianMultifrontalSolver.h index 021c6bb76..3c1603256 100644 --- a/gtsam/linear/GaussianMultifrontalSolver.h +++ b/gtsam/linear/GaussianMultifrontalSolver.h @@ -58,12 +58,6 @@ public: */ GaussianMultifrontalSolver(const FactorGraph& factorGraph); - /** - * Construct the solver for a factor graph. This builds the elimination - * tree, which already does some of the work of elimination. - */ - GaussianMultifrontalSolver(const FactorGraph::shared_ptr& factorGraph); - /** * Construct the solver with a shared pointer to a factor graph and to a * VariableIndex. The solver will store these pointers, so this constructor diff --git a/gtsam/linear/GaussianSequentialSolver.cpp b/gtsam/linear/GaussianSequentialSolver.cpp index 508400a79..1d9543435 100644 --- a/gtsam/linear/GaussianSequentialSolver.cpp +++ b/gtsam/linear/GaussianSequentialSolver.cpp @@ -30,10 +30,6 @@ namespace gtsam { GaussianSequentialSolver::GaussianSequentialSolver(const FactorGraph& factorGraph) : Base(factorGraph) {} -/* ************************************************************************* */ -GaussianSequentialSolver::GaussianSequentialSolver(const FactorGraph::shared_ptr& factorGraph) : - Base(factorGraph) {} - /* ************************************************************************* */ GaussianSequentialSolver::GaussianSequentialSolver(const FactorGraph::shared_ptr& factorGraph, const VariableIndex::shared_ptr& variableIndex) : diff --git a/gtsam/linear/GaussianSequentialSolver.h b/gtsam/linear/GaussianSequentialSolver.h index 1b02d8316..25890071c 100644 --- a/gtsam/linear/GaussianSequentialSolver.h +++ b/gtsam/linear/GaussianSequentialSolver.h @@ -65,12 +65,6 @@ public: */ GaussianSequentialSolver(const FactorGraph& factorGraph); - /** - * Construct the solver for a factor graph. This builds the elimination - * tree, which already does some of the work of elimination. - */ - GaussianSequentialSolver(const FactorGraph::shared_ptr& factorGraph); - /** * Construct the solver with a shared pointer to a factor graph and to a * VariableIndex. The solver will store these pointers, so this constructor diff --git a/gtsam/linear/SubgraphSolver.h b/gtsam/linear/SubgraphSolver.h index 14a460be6..d32f04c53 100644 --- a/gtsam/linear/SubgraphSolver.h +++ b/gtsam/linear/SubgraphSolver.h @@ -57,19 +57,19 @@ namespace gtsam { SubgraphSolver(const GRAPH& G, const VALUES& theta0, const Parameters ¶meters = Parameters()): IterativeSolver(parameters){ initialize(G,theta0); } - SubgraphSolver(const typename LINEAR::shared_ptr& GFG) { + SubgraphSolver(const LINEAR& GFG) { std::cout << "[SubgraphSolver] Unexpected usage.." << std::endl; throw std::runtime_error("SubgraphSolver: gaussian factor graph initialization not supported"); - } + } - SubgraphSolver(const SubgraphSolver& solver) : - IterativeSolver(solver), ordering_(solver.ordering_), pairs_(solver.pairs_), pc_(solver.pc_){} + SubgraphSolver(const SubgraphSolver& solver) : + IterativeSolver(solver), ordering_(solver.ordering_), pairs_(solver.pairs_), pc_(solver.pc_){} - SubgraphSolver(shared_ordering ordering, - mapPairIndex pairs, - shared_preconditioner pc, - sharedParameters parameters = boost::make_shared()) : - IterativeSolver(parameters), ordering_(ordering), pairs_(pairs), pc_(pc) {} + SubgraphSolver(shared_ordering ordering, + mapPairIndex pairs, + shared_preconditioner pc, + sharedParameters parameters = boost::make_shared()) : + IterativeSolver(parameters), ordering_(ordering), pairs_(pairs), pc_(pc) {} void replaceFactors(const typename LINEAR::shared_ptr &graph); VectorValues::shared_ptr optimize() const ; diff --git a/gtsam/nonlinear/NonlinearOptimizer-inl.h b/gtsam/nonlinear/NonlinearOptimizer-inl.h index 48228c855..805c56b32 100644 --- a/gtsam/nonlinear/NonlinearOptimizer-inl.h +++ b/gtsam/nonlinear/NonlinearOptimizer-inl.h @@ -176,7 +176,7 @@ namespace gtsam { // solve if(solver_) solver_->replaceFactors(damped); - else solver_.reset(new S(damped)); + else solver_.reset(new S(*damped)); VectorValues delta = *solver_->optimize(); if (verbosity >= Parameters::TRYDELTA) delta.print("delta");