SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ModelFitting::GSLEngine Class Reference

LeastSquareEngine implementation which uses the GNU Scientific Library. More...

#include <GSLEngine.h>

Inheritance diagram for ModelFitting::GSLEngine:
Inheritance graph
[legend]
Collaboration diagram for ModelFitting::GSLEngine:
Collaboration graph
[legend]

Public Member Functions

 GSLEngine (int itmax=1000, double xtol=1e-8, double gtol=1e-8, double ftol=1e-8, double delta=1e-4)
 Constructs a new instance of the engine.
 
virtual ~GSLEngine ()=default
 Destructor.
 
LeastSquareSummary solveProblem (EngineParameterManager &parameter_manager, ResidualEstimator &residual_estimator) override
 
- Public Member Functions inherited from ModelFitting::LeastSquareEngine
virtual ~LeastSquareEngine ()=default
 Destructor.
 

Private Attributes

int m_itmax
 
double m_xtol
 
double m_gtol
 
double m_ftol
 
double m_delta
 

Detailed Description

LeastSquareEngine implementation which uses the GNU Scientific Library.

See also
https://www.gnu.org/software/gsl/doc/html/nls.html

Definition at line 39 of file GSLEngine.h.

Constructor & Destructor Documentation

◆ GSLEngine()

ModelFitting::GSLEngine::GSLEngine ( int itmax = 1000,
double xtol = 1e-8,
double gtol = 1e-8,
double ftol = 1e-8,
double delta = 1e-4 )

Constructs a new instance of the engine.

Parameters
itmaxMaximum number of iteratios
xtolStep tolerance: \f|\delta_i| \le xtol(|x_i| + xtol)\f
gtolGradient tolerance: \f\underset{i}{max}|g_i \times max(x_i, 1)| \le gtol \times max(\Phi(x),1)\f
ftolTolerance for the change in \f\chi^2\f Some versions of the GSL library ignore this.
deltaStep size for finite difference Jacobian

Definition at line 41 of file GSLEngine.cpp.

◆ ~GSLEngine()

virtual ModelFitting::GSLEngine::~GSLEngine ( )
virtualdefault

Destructor.

Member Function Documentation

◆ solveProblem()

LeastSquareSummary ModelFitting::GSLEngine::solveProblem ( ModelFitting::EngineParameterManager & parameter_manager,
ModelFitting::ResidualEstimator & residual_estimator )
overridevirtual

Solves the minimization problem using the levmar library. The returned summary contains as underlying_framework_info an std::array<double,10>, which keeps the information regarding the minimization as it is provided by levmar (for more info see http://users.ics.forth.gr/~lourakis/levmar).

Implements ModelFitting::LeastSquareEngine.

Definition at line 118 of file GSLEngine.cpp.

References std::end(), ModelFitting::getStatusFlag(), m_delta, m_ftol, m_gtol, m_itmax, m_xtol, std::chrono::steady_clock::now(), std::sqrt(), std::tie(), and x.

Here is the call graph for this function:

Member Data Documentation

◆ m_delta

double ModelFitting::GSLEngine::m_delta
private

Definition at line 71 of file GSLEngine.h.

Referenced by solveProblem().

◆ m_ftol

double ModelFitting::GSLEngine::m_ftol
private

Definition at line 71 of file GSLEngine.h.

Referenced by solveProblem().

◆ m_gtol

double ModelFitting::GSLEngine::m_gtol
private

Definition at line 71 of file GSLEngine.h.

Referenced by solveProblem().

◆ m_itmax

int ModelFitting::GSLEngine::m_itmax
private

Definition at line 70 of file GSLEngine.h.

Referenced by solveProblem().

◆ m_xtol

double ModelFitting::GSLEngine::m_xtol
private

Definition at line 71 of file GSLEngine.h.

Referenced by solveProblem().


The documentation for this class was generated from the following files: