BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ChiSquaredModule.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sim/Residual/ChiSquaredModule.h
6 //! @brief Defines class ChiSquaredModule.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_SIM_RESIDUAL_CHISQUAREDMODULE_H
16 #define BORNAGAIN_SIM_RESIDUAL_CHISQUAREDMODULE_H
17 
19 
20 //! Calculation of chi2 between two data sets.
21 //! @ingroup fitting
22 
24 public:
25  ChiSquaredModule() = default;
26  ChiSquaredModule(const ChiSquaredModule& other) = default;
27  ~ChiSquaredModule() override = default;
28 
29  ChiSquaredModule* clone() const override { return new ChiSquaredModule(*this); }
30 
31  double residual(double a, double b, double weight) override;
32 };
33 
34 #endif // BORNAGAIN_SIM_RESIDUAL_CHISQUAREDMODULE_H
Defines interface IChiSquaredModule.
Calculation of chi2 between two data sets.
ChiSquaredModule()=default
~ChiSquaredModule() override=default
ChiSquaredModule * clone() const override
clone method
double residual(double a, double b, double weight) override
ChiSquaredModule(const ChiSquaredModule &other)=default
Interface residual calculations.