BornAgain  1.18.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 scattering at grazing incidence
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_CORE_AXIS_CONSTKBINAXIS_H
16 #define BORNAGAIN_CORE_AXIS_CONSTKBINAXIS_H
17 
19 
20 //! Axis with fixed bin size in sin(angle) space.
21 //! @ingroup tools
22 
24 {
25 public:
26  //! ConstKBinAxis constructor.
27  //! @param name Axis name
28  //! @param nbins number of bins
29  //! @param start low edge of first bin
30  //! @param end upper edge of last bin
31  ConstKBinAxis(const std::string& name, size_t nbins, double start, double end);
32  ~ConstKBinAxis() final {}
33 
34  ConstKBinAxis* clone() const final;
35 
36  ConstKBinAxis* createClippedAxis(double left, double right) const final;
37 
38 protected:
39  ConstKBinAxis(const std::string& name, size_t nbins);
40 
41  void print(std::ostream& ostr) const final;
42  bool equals(const IAxis& other) const final;
43 
44  double m_start;
45  double m_end;
46 };
47 
48 #endif // BORNAGAIN_CORE_AXIS_CONSTKBINAXIS_H
Defines class VariableBinAxis.
Axis with fixed bin size in sin(angle) space.
Definition: ConstKBinAxis.h:24
ConstKBinAxis * createClippedAxis(double left, double right) const final
Creates a new clipped axis.
void print(std::ostream &ostr) const final
ConstKBinAxis(const std::string &name, size_t nbins, double start, double end)
ConstKBinAxis constructor.
~ConstKBinAxis() final
Definition: ConstKBinAxis.h:32
bool equals(const IAxis &other) const final
ConstKBinAxis * clone() const final
clone function
Interface for one-dimensional axes.
Definition: IAxis.h:25
Axis with variable bin size.