15 #ifndef BORNAGAIN_CORE_AXIS_POINTWISEAXIS_H
16 #define BORNAGAIN_CORE_AXIS_POINTWISEAXIS_H
35 template <
class String,
class Vector>
37 :
IAxis(std::forward<String>(name)),
m_coordinates(std::forward<Vector>(coordinate_values))
57 double getMin()
const override;
60 double getMax()
const override;
76 std::string
pyString(
const std::string& units,
size_t offset)
const final;
79 void print(std::ostream& ostr)
const override;
Interface for one-dimensional axes.
Axis containing arbitrary (non-equidistant) coordinate values.
double upperBoundary(size_t index) const
double lowerBoundary(size_t index) const
PointwiseAxis(String &&name, Vector &&coordinate_values)
Bin1D getBin(size_t index) const override
retrieve a 1d bin for the given index
PointwiseAxis * clone() const override
clone function
~PointwiseAxis() override=default
std::vector< double > getBinCenters() const override
void checkIndex(size_t index) const
double getBinCenter(size_t index) const override
Returns the coordinate corresponding to the given index.
std::vector< double > m_coordinates
PointwiseAxis * createClippedAxis(double left, double right) const override
Creates a new clipped axis.
std::string pyString(const std::string &units, size_t offset) const final
std::vector< double > getBinBoundaries() const override
double getMax() const override
Returns value of last on-axis point.
size_t findClosestIndex(double value) const override
find index of the coordinate closest to the given value
double operator[](size_t index) const override
indexed accessor retrieves a sample
size_t size() const override
retrieve the number of bins
double getMin() const override
Returns value of first on-axis point.
bool equals(const IAxis &other) const override
void print(std::ostream &ostr) const override