BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
IIntensityFunction.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sim/Residual/IIntensityFunction.h
6 //! @brief Defines and implements the interface class IIntensityFunction
7 //! and its child classes IntensityFunctionLog, IntensityFunctionSqrt
8 //!
9 //! @homepage http://www.bornagainproject.org
10 //! @license GNU General Public License v3 or higher (see COPYING)
11 //! @copyright Forschungszentrum Jülich GmbH 2018
12 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
13 //
14 // ************************************************************************************************
15 
16 #ifndef BORNAGAIN_SIM_RESIDUAL_IINTENSITYFUNCTION_H
17 #define BORNAGAIN_SIM_RESIDUAL_IINTENSITYFUNCTION_H
18 
19 //! Interface for applying arbitrary function to the measured intensity.
20 
22 public:
24  virtual IIntensityFunction* clone() const = 0;
25  virtual double evaluate(double value) const = 0;
26 };
27 
28 //! Algorithm for applying log function to the measured intensity.
29 
31 public:
32  IntensityFunctionLog* clone() const override;
33  double evaluate(double value) const override;
34 };
35 
36 //! Algorithm for applying sqrt function to the measured intensity.
37 
39 public:
40  IntensityFunctionSqrt* clone() const override;
41  double evaluate(double value) const override;
42 };
43 
44 #endif // BORNAGAIN_SIM_RESIDUAL_IINTENSITYFUNCTION_H
Interface for applying arbitrary function to the measured intensity.
virtual ~IIntensityFunction()
virtual double evaluate(double value) const =0
virtual IIntensityFunction * clone() const =0
Algorithm for applying log function to the measured intensity.
double evaluate(double value) const override
IntensityFunctionLog * clone() const override
Algorithm for applying sqrt function to the measured intensity.
IntensityFunctionSqrt * clone() const override
double evaluate(double value) const override