update the optimize interface
parent
6284312a5c
commit
e3aaeedbf2
|
|
@ -68,6 +68,10 @@ namespace gtsam {
|
||||||
|
|
||||||
/* interface to the nonlinear optimizer */
|
/* interface to the nonlinear optimizer */
|
||||||
virtual VectorValues optimize () = 0;
|
virtual VectorValues optimize () = 0;
|
||||||
|
|
||||||
|
/* interface to the nonlinear optimizer */
|
||||||
|
virtual VectorValues optimize (const VectorValues &initial) = 0;
|
||||||
|
|
||||||
/* update interface to the nonlinear optimizer */
|
/* update interface to the nonlinear optimizer */
|
||||||
virtual void replaceFactors(const GaussianFactorGraph::shared_ptr &factorGraph, const double lambda) {}
|
virtual void replaceFactors(const GaussianFactorGraph::shared_ptr &factorGraph, const double lambda) {}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,11 @@ VectorValues SubgraphSolver::optimize() {
|
||||||
return pc_->x(ybar);
|
return pc_->x(ybar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VectorValues SubgraphSolver::optimize(const VectorValues &initial) {
|
||||||
|
// the initial is ignored in this case ...
|
||||||
|
return optimize();
|
||||||
|
}
|
||||||
|
|
||||||
void SubgraphSolver::initialize(const GaussianFactorGraph &jfg)
|
void SubgraphSolver::initialize(const GaussianFactorGraph &jfg)
|
||||||
{
|
{
|
||||||
GaussianFactorGraph::shared_ptr Ab1 = boost::make_shared<GaussianFactorGraph>(),
|
GaussianFactorGraph::shared_ptr Ab1 = boost::make_shared<GaussianFactorGraph>(),
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ public:
|
||||||
|
|
||||||
virtual ~SubgraphSolver() {}
|
virtual ~SubgraphSolver() {}
|
||||||
virtual VectorValues optimize () ;
|
virtual VectorValues optimize () ;
|
||||||
|
virtual VectorValues optimize (const VectorValues &initial) ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue