update the optimize interface

release/4.3a0
Yong-Dian Jian 2012-09-24 21:05:37 +00:00
parent 6284312a5c
commit e3aaeedbf2
3 changed files with 10 additions and 0 deletions

View File

@ -68,6 +68,10 @@ namespace gtsam {
/* interface to the nonlinear optimizer */
virtual VectorValues optimize () = 0;
/* interface to the nonlinear optimizer */
virtual VectorValues optimize (const VectorValues &initial) = 0;
/* update interface to the nonlinear optimizer */
virtual void replaceFactors(const GaussianFactorGraph::shared_ptr &factorGraph, const double lambda) {}
};

View File

@ -78,6 +78,11 @@ VectorValues SubgraphSolver::optimize() {
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)
{
GaussianFactorGraph::shared_ptr Ab1 = boost::make_shared<GaussianFactorGraph>(),

View File

@ -72,6 +72,7 @@ public:
virtual ~SubgraphSolver() {}
virtual VectorValues optimize () ;
virtual VectorValues optimize (const VectorValues &initial) ;
protected: