fix compile error
parent
ea3e137060
commit
70aa2f7f5d
|
@ -33,9 +33,6 @@ namespace gtsam {
|
||||||
|
|
||||||
typedef boost::shared_ptr<const ConjugateGradientSolver> shared_ptr ;
|
typedef boost::shared_ptr<const ConjugateGradientSolver> shared_ptr ;
|
||||||
|
|
||||||
// ConjugateGradientSolver(const GRAPH &graph, const VALUES &initial, const Ordering &ordering, const sharedParameters parameters):
|
|
||||||
// IterativeSolver(parameters), ptr_(0), zeros_(boost::make_shared<VectorValues>(initial.zero(ordering))) {}
|
|
||||||
|
|
||||||
ConjugateGradientSolver(const GRAPH &graph, const VALUES &initial, const Ordering &ordering, const Parameters ¶meters = Parameters()):
|
ConjugateGradientSolver(const GRAPH &graph, const VALUES &initial, const Ordering &ordering, const Parameters ¶meters = Parameters()):
|
||||||
IterativeSolver(parameters), ptr_(0), zeros_(boost::make_shared<VectorValues>(initial.zero(ordering))) {}
|
IterativeSolver(parameters), ptr_(0), zeros_(boost::make_shared<VectorValues>(initial.zero(ordering))) {}
|
||||||
|
|
||||||
|
@ -53,7 +50,6 @@ namespace gtsam {
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorValues::shared_ptr optimize() const {
|
VectorValues::shared_ptr optimize() const {
|
||||||
//boost::shared_ptr<VectorValues> zeros (ptr_->allocateVectorVavlues());
|
|
||||||
VectorValues x = conjugateGradientDescent(*ptr_, *zeros_, parameters_);
|
VectorValues x = conjugateGradientDescent(*ptr_, *zeros_, parameters_);
|
||||||
return boost::make_shared<VectorValues>(x) ;
|
return boost::make_shared<VectorValues>(x) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,13 +75,10 @@ namespace gtsam {
|
||||||
VectorValues::shared_ptr optimize() const ;
|
VectorValues::shared_ptr optimize() const ;
|
||||||
shared_ordering ordering() const { return ordering_; }
|
shared_ordering ordering() const { return ordering_; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void initialize(const GRAPH& G, const VALUES& theta0);
|
void initialize(const GRAPH& G, const VALUES& theta0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
SubgraphSolver():IterativeSolver(){}
|
SubgraphSolver():IterativeSolver(){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace gtsam {
|
||||||
typedef NonlinearOptimizer<G, T, GaussianFactorGraph, Solver> Optimizer;
|
typedef NonlinearOptimizer<G, T, GaussianFactorGraph, Solver> Optimizer;
|
||||||
|
|
||||||
Ordering::shared_ptr ordering = initialEstimate.orderingArbitrary() ;
|
Ordering::shared_ptr ordering = initialEstimate.orderingArbitrary() ;
|
||||||
sharedSolver solver = boost::make_shared<Solver>(graph, initialEstimate, *ordering, boost::make_shared<IterativeOptimizationParameters>());
|
sharedSolver solver = boost::make_shared<Solver>(graph, initialEstimate, *ordering, IterativeOptimizationParameters());
|
||||||
Optimizer optimizer(
|
Optimizer optimizer(
|
||||||
boost::make_shared<const G>(graph),
|
boost::make_shared<const G>(graph),
|
||||||
boost::make_shared<const T>(initialEstimate),
|
boost::make_shared<const T>(initialEstimate),
|
||||||
|
@ -105,7 +105,7 @@ namespace gtsam {
|
||||||
typedef SubgraphSolver<G,GaussianFactorGraph,T> Solver;
|
typedef SubgraphSolver<G,GaussianFactorGraph,T> Solver;
|
||||||
typedef boost::shared_ptr<Solver> shared_Solver;
|
typedef boost::shared_ptr<Solver> shared_Solver;
|
||||||
typedef NonlinearOptimizer<G, T, GaussianFactorGraph, Solver> SPCGOptimizer;
|
typedef NonlinearOptimizer<G, T, GaussianFactorGraph, Solver> SPCGOptimizer;
|
||||||
shared_Solver solver = boost::make_shared<Solver>(graph, initialEstimate);
|
shared_Solver solver = boost::make_shared<Solver>(graph, initialEstimate, IterativeOptimizationParameters());
|
||||||
SPCGOptimizer optimizer(
|
SPCGOptimizer optimizer(
|
||||||
boost::make_shared<const G>(graph),
|
boost::make_shared<const G>(graph),
|
||||||
boost::make_shared<const T>(initialEstimate),
|
boost::make_shared<const T>(initialEstimate),
|
||||||
|
|
Loading…
Reference in New Issue