Merged in fix/416_iterate (pull request #428)
close issue #416 Add return argument for iteraterelease/4.3a0
						commit
						340fe9afc8
					
				
							
								
								
									
										2
									
								
								gtsam.h
								
								
								
								
							
							
						
						
									
										2
									
								
								gtsam.h
								
								
								
								
							| 
						 | 
				
			
			@ -2140,7 +2140,7 @@ virtual class NonlinearOptimizer {
 | 
			
		|||
  double error() const;
 | 
			
		||||
  int iterations() const;
 | 
			
		||||
  gtsam::Values values() const;
 | 
			
		||||
  void iterate() const;
 | 
			
		||||
  gtsam::GaussianFactorGraph* iterate() const;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#include <gtsam/nonlinear/GaussNewtonOptimizer.h>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -105,9 +105,9 @@ public:
 | 
			
		|||
  /** Virtual destructor */
 | 
			
		||||
  virtual ~DoglegOptimizer() {}
 | 
			
		||||
 | 
			
		||||
  /** Perform a single iteration, returning a new NonlinearOptimizer class
 | 
			
		||||
   * containing the updated variable assignments, which may be retrieved with
 | 
			
		||||
   * values().
 | 
			
		||||
  /** 
 | 
			
		||||
   * Perform a single iteration, returning GaussianFactorGraph corresponding to 
 | 
			
		||||
   * the linearized factor graph.
 | 
			
		||||
   */
 | 
			
		||||
  GaussianFactorGraph::shared_ptr iterate() override;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -70,9 +70,9 @@ public:
 | 
			
		|||
  /** Virtual destructor */
 | 
			
		||||
  virtual ~GaussNewtonOptimizer() {}
 | 
			
		||||
 | 
			
		||||
  /** Perform a single iteration, returning a new NonlinearOptimizer class
 | 
			
		||||
   * containing the updated variable assignments, which may be retrieved with
 | 
			
		||||
   * values().
 | 
			
		||||
  /** 
 | 
			
		||||
   * Perform a single iteration, returning GaussianFactorGraph corresponding to 
 | 
			
		||||
   * the linearized factor graph.
 | 
			
		||||
   */
 | 
			
		||||
  GaussianFactorGraph::shared_ptr iterate() override;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,9 +94,9 @@ public:
 | 
			
		|||
  /// @name Advanced interface
 | 
			
		||||
  /// @{
 | 
			
		||||
 | 
			
		||||
  /** Perform a single iteration, returning a new NonlinearOptimizer class
 | 
			
		||||
   * containing the updated variable assignments, which may be retrieved with
 | 
			
		||||
   * values().
 | 
			
		||||
  /** 
 | 
			
		||||
   * Perform a single iteration, returning GaussianFactorGraph corresponding to 
 | 
			
		||||
   * the linearized factor graph.
 | 
			
		||||
   */
 | 
			
		||||
  GaussianFactorGraph::shared_ptr iterate() override;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -70,7 +70,16 @@ public:
 | 
			
		|||
  virtual ~NonlinearConjugateGradientOptimizer() {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /** 
 | 
			
		||||
   * Perform a single iteration, returning GaussianFactorGraph corresponding to 
 | 
			
		||||
   * the linearized factor graph.
 | 
			
		||||
   */
 | 
			
		||||
  GaussianFactorGraph::shared_ptr iterate() override;
 | 
			
		||||
 | 
			
		||||
  /** 
 | 
			
		||||
   * Optimize for the maximum-likelihood estimate, returning a the optimized 
 | 
			
		||||
   * variable assignments.
 | 
			
		||||
   */
 | 
			
		||||
  const Values& optimize() override;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,9 +86,9 @@ public:
 | 
			
		|||
  /// @name Standard interface
 | 
			
		||||
  /// @{
 | 
			
		||||
 | 
			
		||||
  /** Optimize for the maximum-likelihood estimate, returning a new
 | 
			
		||||
   * NonlinearOptimizer class containing the optimized variable assignments,
 | 
			
		||||
   * which may be retrieved with values().
 | 
			
		||||
  /** 
 | 
			
		||||
   * Optimize for the maximum-likelihood estimate, returning a the optimized 
 | 
			
		||||
   * variable assignments.
 | 
			
		||||
   *
 | 
			
		||||
   * This function simply calls iterate() in a loop, checking for convergence
 | 
			
		||||
   * with check_convergence().  For fine-grain control over the optimization
 | 
			
		||||
| 
						 | 
				
			
			@ -126,9 +126,9 @@ public:
 | 
			
		|||
  virtual VectorValues solve(const GaussianFactorGraph &gfg,
 | 
			
		||||
      const NonlinearOptimizerParams& params) const;
 | 
			
		||||
 | 
			
		||||
  /** Perform a single iteration, returning a new NonlinearOptimizer class
 | 
			
		||||
   * containing the updated variable assignments, which may be retrieved with
 | 
			
		||||
   * values().
 | 
			
		||||
  /** 
 | 
			
		||||
   * Perform a single iteration, returning GaussianFactorGraph corresponding to 
 | 
			
		||||
   * the linearized factor graph.
 | 
			
		||||
   */
 | 
			
		||||
  virtual GaussianFactorGraph::shared_ptr iterate() = 0;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue