15 #ifndef BORNAGAIN_CORE_AXIS_FIXEDBINAXIS_H
16 #define BORNAGAIN_CORE_AXIS_FIXEDBINAXIS_H
31 FixedBinAxis(
const std::string& name,
size_t nbins,
double start,
double end);
55 std::string
pyString(
const std::string& units,
size_t)
const final;
58 void print(std::ostream& ostr)
const;
Axis with fixed bin size.
FixedBinAxis * createClippedAxis(double left, double right) const
Creates a new clipped axis.
virtual bool equals(const IAxis &other) const
double operator[](size_t index) const
indexed accessor retrieves a sample
size_t findClosestIndex(double value) const
find bin index which is best match for given value
double getMax() const
Returns value of last point of axis.
void print(std::ostream &ostr) const
FixedBinAxis * clone() const
clone function
std::vector< double > getBinBoundaries() const
double getBinCenter(size_t index) const
double getMin() const
Returns value of first point of axis.
std::vector< double > getBinCenters() const
std::string pyString(const std::string &units, size_t) const final
FixedBinAxis(const std::string &name, size_t nbins, double start, double end)
FixedBinAxis constructor.
size_t size() const
retrieve the number of bins
Bin1D getBin(size_t index) const
retrieve a 1d bin for the given index
Interface for one-dimensional axes.