remove duplicated constructors
							parent
							
								
									e726f7c7af
								
							
						
					
					
						commit
						1e54c8c2c0
					
				|  | @ -35,11 +35,6 @@ template<class FACTOR, class JUNCTIONTREE> | ||||||
| GenericMultifrontalSolver<FACTOR, JUNCTIONTREE>::GenericMultifrontalSolver(const FactorGraph<FACTOR>& factorGraph) : | GenericMultifrontalSolver<FACTOR, JUNCTIONTREE>::GenericMultifrontalSolver(const FactorGraph<FACTOR>& factorGraph) : | ||||||
|     structure_(new VariableIndex(factorGraph)), junctionTree_(new JUNCTIONTREE(factorGraph, *structure_)) {} |     structure_(new VariableIndex(factorGraph)), junctionTree_(new JUNCTIONTREE(factorGraph, *structure_)) {} | ||||||
| 
 | 
 | ||||||
| /* ************************************************************************* */ |  | ||||||
| template<class FACTOR, class JUNCTIONTREE> |  | ||||||
| GenericMultifrontalSolver<FACTOR, JUNCTIONTREE>::GenericMultifrontalSolver(const typename FactorGraph<FACTOR>::shared_ptr& factorGraph) : |  | ||||||
|     structure_(new VariableIndex(*factorGraph)), junctionTree_(new JUNCTIONTREE(*factorGraph, *structure_)) {} |  | ||||||
| 
 |  | ||||||
| /* ************************************************************************* */ | /* ************************************************************************* */ | ||||||
| template<class FACTOR, class JUNCTIONTREE> | template<class FACTOR, class JUNCTIONTREE> | ||||||
| GenericMultifrontalSolver<FACTOR, JUNCTIONTREE>::GenericMultifrontalSolver( | GenericMultifrontalSolver<FACTOR, JUNCTIONTREE>::GenericMultifrontalSolver( | ||||||
|  |  | ||||||
|  | @ -45,12 +45,6 @@ public: | ||||||
|    */ |    */ | ||||||
|   GenericMultifrontalSolver(const FactorGraph<FACTOR>& factorGraph); |   GenericMultifrontalSolver(const FactorGraph<FACTOR>& 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<FACTOR>::shared_ptr& factorGraph); |  | ||||||
| 
 |  | ||||||
|   /**
 |   /**
 | ||||||
|    * Construct the solver with a shared pointer to a factor graph and to a |    * Construct the solver with a shared pointer to a factor graph and to a | ||||||
|    * VariableIndex.  The solver will store these pointers, so this constructor |    * VariableIndex.  The solver will store these pointers, so this constructor | ||||||
|  |  | ||||||
|  | @ -34,12 +34,6 @@ GenericSequentialSolver<FACTOR>::GenericSequentialSolver(const FactorGraph<FACTO | ||||||
|     factors_(new FactorGraph<FACTOR>(factorGraph)), structure_(new VariableIndex(factorGraph)), |     factors_(new FactorGraph<FACTOR>(factorGraph)), structure_(new VariableIndex(factorGraph)), | ||||||
|     eliminationTree_(EliminationTree<FACTOR>::Create(*factors_, *structure_)) {} |     eliminationTree_(EliminationTree<FACTOR>::Create(*factors_, *structure_)) {} | ||||||
| 
 | 
 | ||||||
| /* ************************************************************************* */ |  | ||||||
| template<class FACTOR> |  | ||||||
| GenericSequentialSolver<FACTOR>::GenericSequentialSolver(const typename FactorGraph<FACTOR>::shared_ptr& factorGraph) : |  | ||||||
|     factors_(factorGraph), structure_(new VariableIndex(*factorGraph)), |  | ||||||
|     eliminationTree_(EliminationTree<FACTOR>::Create(*factors_, *structure_)) {} |  | ||||||
| 
 |  | ||||||
| /* ************************************************************************* */ | /* ************************************************************************* */ | ||||||
| template<class FACTOR> | template<class FACTOR> | ||||||
| GenericSequentialSolver<FACTOR>::GenericSequentialSolver(const typename FactorGraph<FACTOR>::shared_ptr& factorGraph, | GenericSequentialSolver<FACTOR>::GenericSequentialSolver(const typename FactorGraph<FACTOR>::shared_ptr& factorGraph, | ||||||
|  |  | ||||||
|  | @ -48,12 +48,6 @@ public: | ||||||
|    */ |    */ | ||||||
|   GenericSequentialSolver(const FactorGraph<FACTOR>& factorGraph); |   GenericSequentialSolver(const FactorGraph<FACTOR>& 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<FACTOR>::shared_ptr& factorGraph); |  | ||||||
| 
 |  | ||||||
|   /**
 |   /**
 | ||||||
|    * Construct the solver with a shared pointer to a factor graph and to a |    * Construct the solver with a shared pointer to a factor graph and to a | ||||||
|    * VariableIndex.  The solver will store these pointers, so this constructor |    * VariableIndex.  The solver will store these pointers, so this constructor | ||||||
|  |  | ||||||
|  | @ -30,10 +30,6 @@ namespace gtsam { | ||||||
| GaussianMultifrontalSolver::GaussianMultifrontalSolver(const FactorGraph<GaussianFactor>& factorGraph) : | GaussianMultifrontalSolver::GaussianMultifrontalSolver(const FactorGraph<GaussianFactor>& factorGraph) : | ||||||
|     Base(factorGraph) {} |     Base(factorGraph) {} | ||||||
| 
 | 
 | ||||||
| /* ************************************************************************* */ |  | ||||||
| GaussianMultifrontalSolver::GaussianMultifrontalSolver(const FactorGraph<GaussianFactor>::shared_ptr& factorGraph) : |  | ||||||
|     Base(factorGraph) {} |  | ||||||
| 
 |  | ||||||
| /* ************************************************************************* */ | /* ************************************************************************* */ | ||||||
| GaussianMultifrontalSolver::GaussianMultifrontalSolver(const FactorGraph<GaussianFactor>::shared_ptr& factorGraph, const VariableIndex::shared_ptr& variableIndex) : | GaussianMultifrontalSolver::GaussianMultifrontalSolver(const FactorGraph<GaussianFactor>::shared_ptr& factorGraph, const VariableIndex::shared_ptr& variableIndex) : | ||||||
|     Base(factorGraph, variableIndex) {} |     Base(factorGraph, variableIndex) {} | ||||||
|  |  | ||||||
|  | @ -58,12 +58,6 @@ public: | ||||||
|    */ |    */ | ||||||
|   GaussianMultifrontalSolver(const FactorGraph<GaussianFactor>& factorGraph); |   GaussianMultifrontalSolver(const FactorGraph<GaussianFactor>& 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<GaussianFactor>::shared_ptr& factorGraph); |  | ||||||
| 
 |  | ||||||
|   /**
 |   /**
 | ||||||
|    * Construct the solver with a shared pointer to a factor graph and to a |    * Construct the solver with a shared pointer to a factor graph and to a | ||||||
|    * VariableIndex.  The solver will store these pointers, so this constructor |    * VariableIndex.  The solver will store these pointers, so this constructor | ||||||
|  |  | ||||||
|  | @ -30,10 +30,6 @@ namespace gtsam { | ||||||
| GaussianSequentialSolver::GaussianSequentialSolver(const FactorGraph<GaussianFactor>& factorGraph) : | GaussianSequentialSolver::GaussianSequentialSolver(const FactorGraph<GaussianFactor>& factorGraph) : | ||||||
|     Base(factorGraph) {} |     Base(factorGraph) {} | ||||||
| 
 | 
 | ||||||
| /* ************************************************************************* */ |  | ||||||
| GaussianSequentialSolver::GaussianSequentialSolver(const FactorGraph<GaussianFactor>::shared_ptr& factorGraph) : |  | ||||||
|     Base(factorGraph) {} |  | ||||||
| 
 |  | ||||||
| /* ************************************************************************* */ | /* ************************************************************************* */ | ||||||
| GaussianSequentialSolver::GaussianSequentialSolver(const FactorGraph<GaussianFactor>::shared_ptr& factorGraph, | GaussianSequentialSolver::GaussianSequentialSolver(const FactorGraph<GaussianFactor>::shared_ptr& factorGraph, | ||||||
|     const VariableIndex::shared_ptr& variableIndex) : |     const VariableIndex::shared_ptr& variableIndex) : | ||||||
|  |  | ||||||
|  | @ -65,12 +65,6 @@ public: | ||||||
|    */ |    */ | ||||||
|   GaussianSequentialSolver(const FactorGraph<GaussianFactor>& factorGraph); |   GaussianSequentialSolver(const FactorGraph<GaussianFactor>& 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<GaussianFactor>::shared_ptr& factorGraph); |  | ||||||
| 
 |  | ||||||
|   /**
 |   /**
 | ||||||
|    * Construct the solver with a shared pointer to a factor graph and to a |    * Construct the solver with a shared pointer to a factor graph and to a | ||||||
|    * VariableIndex.  The solver will store these pointers, so this constructor |    * VariableIndex.  The solver will store these pointers, so this constructor | ||||||
|  |  | ||||||
|  | @ -57,7 +57,7 @@ namespace gtsam { | ||||||
| 		SubgraphSolver(const GRAPH& G, const VALUES& theta0, const Parameters ¶meters = Parameters()): | 		SubgraphSolver(const GRAPH& G, const VALUES& theta0, const Parameters ¶meters = Parameters()): | ||||||
| 			IterativeSolver(parameters){ initialize(G,theta0); } | 			IterativeSolver(parameters){ initialize(G,theta0); } | ||||||
| 
 | 
 | ||||||
| 	  	SubgraphSolver(const typename LINEAR::shared_ptr& GFG) { | 		SubgraphSolver(const LINEAR& GFG) { | ||||||
| 			std::cout << "[SubgraphSolver] Unexpected usage.." << std::endl; | 			std::cout << "[SubgraphSolver] Unexpected usage.." << std::endl; | ||||||
| 			throw std::runtime_error("SubgraphSolver: gaussian factor graph initialization not supported"); | 			throw std::runtime_error("SubgraphSolver: gaussian factor graph initialization not supported"); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | @ -176,7 +176,7 @@ namespace gtsam { | ||||||
| 
 | 
 | ||||||
| 		  // solve
 | 		  // solve
 | ||||||
| 		  if(solver_) solver_->replaceFactors(damped); | 		  if(solver_) solver_->replaceFactors(damped); | ||||||
| 		  else solver_.reset(new S(damped)); | 		  else solver_.reset(new S(*damped)); | ||||||
| 
 | 
 | ||||||
| 		  VectorValues delta = *solver_->optimize(); | 		  VectorValues delta = *solver_->optimize(); | ||||||
| 		  if (verbosity >= Parameters::TRYDELTA) delta.print("delta"); | 		  if (verbosity >= Parameters::TRYDELTA) delta.print("delta"); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue