Mantid
Loading...
Searching...
No Matches
DampedGaussNewtonMinimizer.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
15
16namespace Mantid {
17namespace CurveFitting {
18namespace CostFunctions {
19class CostFuncLeastSquares;
20} // namespace CostFunctions
21namespace FuncMinimisers {
22
29class MANTID_CURVEFITTING_DLL DampedGaussNewtonMinimizer : public API::IFuncMinimizer {
30public:
32 DampedGaussNewtonMinimizer(double relTol = 0.0001);
34 std::string name() const override { return "DampedGaussNewtonMinimizer"; }
35
37 void initialize(API::ICostFunction_sptr function, size_t maxIterations = 0) override;
39 bool iterate(size_t) override;
41 double costFunctionVal() override;
42
43private:
45 std::shared_ptr<CostFunctions::CostFuncLeastSquares> m_leastSquares;
47 double m_relTol;
49 // double m_damping;
50};
51} // namespace FuncMinimisers
52} // namespace CurveFitting
53} // namespace Mantid
An interface for function minimizers.
Implements a Gauss-Newton minimization algorithm with damping for use with least squares cost functio...
std::shared_ptr< CostFunctions::CostFuncLeastSquares > m_leastSquares
Pointer to the cost function. Must be the least squares.
std::shared_ptr< ICostFunction > ICostFunction_sptr
define a shared pointer to a cost function
Definition: ICostFunction.h:60
Helper class which provides the Collimation Length for SANS instruments.