BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ConstKBinAxis.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Base/Axis/ConstKBinAxis.h
6 //! @brief Defines class ConstKBinAxis.
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_BASE_AXIS_CONSTKBINAXIS_H
16 #define BORNAGAIN_BASE_AXIS_CONSTKBINAXIS_H
17 
19 
20 //! Axis with fixed bin size in sin(angle) space.
21 //! @ingroup tools
22 
24 public:
25  //! ConstKBinAxis constructor.
26  //! @param name Axis name
27  //! @param nbins number of bins
28  //! @param start low edge of first bin
29  //! @param end upper edge of last bin
30  ConstKBinAxis(const std::string& name, size_t nbins, double start, double end);
31  ~ConstKBinAxis() override {}
32 
33  ConstKBinAxis* clone() const override;
34 
35  ConstKBinAxis* createClippedAxis(double left, double right) const override;
36 
37 protected:
38  ConstKBinAxis(const std::string& name, size_t nbins);
39 
40  void print(std::ostream& ostr) const override;
41  bool equals(const IAxis& other) const override;
42 
43  double m_start;
44  double m_end;
45 };
46 
47 #endif // BORNAGAIN_BASE_AXIS_CONSTKBINAXIS_H
Defines class VariableBinAxis.
Axis with fixed bin size in sin(angle) space.
Definition: ConstKBinAxis.h:23
void print(std::ostream &ostr) const override
ConstKBinAxis * createClippedAxis(double left, double right) const override
Creates a new clipped axis.
bool equals(const IAxis &other) const override
ConstKBinAxis(const std::string &name, size_t nbins, double start, double end)
ConstKBinAxis constructor.
ConstKBinAxis * clone() const override
clone function
~ConstKBinAxis() override
Definition: ConstKBinAxis.h:31
Interface for one-dimensional axes.
Definition: IAxis.h:25
Axis with variable bin size.
QString const & name(EShape k)
Definition: particles.cpp:21