16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_BASE_AXIS_POINTWISEAXIS_H
21 #define BORNAGAIN_BASE_AXIS_POINTWISEAXIS_H
39 template <
class String,
class Vector>
58 Bin1D bin(
size_t index)
const override;
69 double binCenter(
size_t index)
const override;
82 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)
PointwiseAxis * clone() const override
clone function
~PointwiseAxis() override=default
double upperBound() const override
Returns value of last on-axis point.
double binCenter(size_t index) const override
Returns the coordinate corresponding to the given index.
Bin1D bin(size_t index) const override
retrieve a 1d bin for the given index
void checkIndex(size_t index) const
double lowerBound() const override
Returns value of first on-axis point.
std::vector< double > m_coordinates
PointwiseAxis * createClippedAxis(double left, double right) const override
Creates a new clipped axis.
size_t findClosestIndex(double value) const override
find index of the coordinate closest to the given value
std::vector< double > binBoundaries() const override
double operator[](size_t index) const override
indexed accessor retrieves a sample
size_t size() const override
retrieve the number of bins
bool equals(const IAxis &other) const override
std::vector< double > binCenters() const override
void print(std::ostream &ostr) const override
QString const & name(EShape k)