15 #ifndef BORNAGAIN_BASE_AXIS_VARIABLEBINAXIS_H
16 #define BORNAGAIN_BASE_AXIS_VARIABLEBINAXIS_H
29 VariableBinAxis(
const std::string& name,
const std::vector<double>& bin_boundaries);
36 double operator[](
size_t index)
const override;
38 Bin1D bin(
size_t index)
const override;
40 double min()
const override;
41 double max()
const override;
43 double binCenter(
size_t index)
const override;
47 std::vector<double>
binCenters()
const override;
50 void clip(
double lower,
double upper)
override;
56 void print(std::ostream& ostr)
const override;
Abstract base class for one-dimensional axes.
Axis with variable bin size.
double max() const override
Returns value of last point of axis.
bool equals(const IAxis &other) const override
~VariableBinAxis() override=default
void clip(double lower, double upper) override
Clips this axis to the given values.
std::vector< double > binCenters() const override
void setBinBoundaries(const std::vector< double > &bin_boundaries)
double binCenter(size_t index) const override
double operator[](size_t index) const override
indexed accessor retrieves a sample
Bin1D bin(size_t index) const override
retrieve a 1d bin for the given index
size_t size() const override
Returns the number of bins.
std::vector< double > binBoundaries() const override
std::vector< double > m_bin_boundaries
vector containing the bin limits
VariableBinAxis * clone() const override
size_t findClosestIndex(double value) const override
find bin index which is best match for given value
double min() const override
Returns value of first point of axis.
VariableBinAxis(const std::string &name, const std::vector< double > &bin_boundaries)
VariableBinAxis constructor.
void print(std::ostream &ostr) const override