BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
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 = default;
32 
33  ConstKBinAxis* clone() const override;
34 
35  void clip(double lower, double upper) 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
bool equals(const IAxis &other) const override
ConstKBinAxis(const std::string &name, size_t nbins, double start, double end)
ConstKBinAxis constructor.
~ConstKBinAxis() override=default
void clip(double lower, double upper) override
Clips this axis to the given values.
ConstKBinAxis * clone() const override
Abstract base class for one-dimensional axes.
Definition: IAxis.h:27
Axis with variable bin size.