BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IDistribution1DSampler.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Correlations/IDistribution1DSampler.h
6 //! @brief Defines interface class IFTDistribution1D, and children thereof
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SAMPLE_CORRELATIONS_IDISTRIBUTION1DSAMPLER_H
21 #define BORNAGAIN_SAMPLE_CORRELATIONS_IDISTRIBUTION1DSAMPLER_H
22 
24 public:
27 
28  virtual double randomSample() const = 0;
29 };
30 
32 public:
33  Distribution1DCauchySampler(double lambda) : m_lambda(lambda) {}
34  double randomSample() const final;
35 
36 private:
37  double m_lambda;
38 };
39 
41 public:
42  Distribution1DGaussSampler(double mean, double stddev) : m_mean(mean), m_stddev(stddev) {}
43  double randomSample() const final;
44 
45 private:
46  double m_mean, m_stddev;
47 };
48 
50 public:
51  Distribution1DGateSampler(double a, double b) : m_a(a), m_b(b) {}
52  double randomSample() const final;
53 
54 private:
55  double m_a, m_b; // the left and right limits of the Gate (Uniform) distribution
56 };
57 
59 public:
60  Distribution1DTriangleSampler(double omega) : m_omega(omega) {}
61  double randomSample() const final;
62 
63 private:
64  double m_omega; // half the base of the symmetrical Triangle distribution
65 };
66 
68 public:
69  Distribution1DCosineSampler(double omega) : m_omega(omega) {}
70  double randomSample() const final;
71 
72 private:
73  double m_omega;
74 };
75 
76 #endif // BORNAGAIN_SAMPLE_CORRELATIONS_IDISTRIBUTION1DSAMPLER_H
77 #endif // USER_API
Distribution1DGateSampler(double a, double b)
Distribution1DGaussSampler(double mean, double stddev)
virtual ~IDistribution1DSampler()
virtual double randomSample() const =0