ReFRACtor
nlls_solver_gsl.h
Go to the documentation of this file.
1 #ifndef NLLS_SOLVER_GSL_H
2 #define NLLS_SOLVER_GSL_H
3 #include <gsl/gsl_multifit_nlin.h>
4 #include <nlls_solver.h>
5 
6 namespace FullPhysics {
7 /******************************************************************
8  This class is the base class for the solvers of the NLLS
9  problem based on the GSL library for problems with
10  implemented Jacobian as well as residual.
11 *******************************************************************/
12 class NLLSSolverGSL :
13  public NLLSSolver {
14 
15 public:
16 
17 //-----------------------------------------------------------------------
26 //-----------------------------------------------------------------------
27 
28  NLLSSolverGSL(const boost::shared_ptr<NLLSProblem>& p, int max_cost_function_calls,
29  double dx_tol_abs=0.000001, double dx_tol_rel=0.000001, double g_tol=6.0555e-06,
30  bool vrbs=false)
31  : NLLSSolver(p, max_cost_function_calls, vrbs),
32  Dx_tol_abs(dx_tol_abs), Dx_tol_rel(dx_tol_rel), G_tol(g_tol)
33  {}
34 
35  virtual ~NLLSSolverGSL() {}
36 
37  virtual void solve();
38 
39 //-----------------------------------------------------------------------
41 //-----------------------------------------------------------------------
42 
43  virtual void print(std::ostream& Os) const
44  { Os << "NLLSSolverGSL"; }
45 
46 protected:
47 
48 
49  double Dx_tol_abs;
50  double Dx_tol_rel;
51  double G_tol;
52 
53 
54  virtual const gsl_multifit_fdfsolver_type* get_gsl_multifit_fdfsolver()
55  { return gsl_multifit_fdfsolver_lmsder; /*default*/ }
56 
57 };
58 }
59 #endif
The base class for the solvers of the Nonlinear-Least-Squares Problem.
Definition: nlls_solver.h:24
NLLSSolverGSL(const boost::shared_ptr< NLLSProblem > &p, int max_cost_function_calls, double dx_tol_abs=0.000001, double dx_tol_rel=0.000001, double g_tol=6.0555e-06, bool vrbs=false)
Initializes the solver.
virtual void print(std::ostream &Os) const
Print description of object.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual void solve()
The method that solves the optimization problem.
virtual const gsl_multifit_fdfsolver_type * get_gsl_multifit_fdfsolver()

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:10