BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
PointwiseAxis Class Reference

Axis containing arbitrary (non-equidistant) coordinate values. More...

+ Inheritance diagram for PointwiseAxis:

Public Member Functions

template<class String , class Vector >
 PointwiseAxis (String &&name, Vector &&coordinate_values)
 
PointwiseAxisclone () const override
 clone function
 
size_t size () const override
 retrieve the number of bins
 
double operator[] (size_t index) const override
 indexed accessor retrieves a sample
 
Bin1D getBin (size_t index) const override
 retrieve a 1d bin for the given index
 
double getMin () const override
 Returns value of first on-axis point.
 
double getMax () const override
 Returns value of last on-axis point.
 
double getBinCenter (size_t index) const override
 Returns the coordinate corresponding to the given index.
 
size_t findClosestIndex (double value) const override
 find index of the coordinate closest to the given value
 
std::vector< double > getBinCenters () const override
 
std::vector< double > getBinBoundaries () const override
 
PointwiseAxiscreateClippedAxis (double left, double right) const override
 Creates a new clipped axis.
 
std::string pyString (const std::string &units, size_t offset) const final
 
- Public Member Functions inherited from IAxis
 IAxis (const std::string &name)
 constructors
 
virtual ~IAxis ()
 destructor
 
std::string getName () const
 retrieve the label of the axis
 
void setName (std::string name)
 Sets the axis label.
 
bool operator== (const IAxis &right) const
 test for equality
 
bool operator!= (const IAxis &right) const
 
virtual bool contains (double value) const
 Returns true if axis contains given point.
 

Additional Inherited Members

Detailed Description

Axis containing arbitrary (non-equidistant) coordinate values.

Lower boundary of the first bin and upper boundary of the last bin correspond to first and last passed coordinates. Other bin boundaries are computed as arithmetical mean of two adjacent coordinates. One should be aware, that bin centers reported by PointwiseAxis::getBinCenter do not coincide with the values produced by Bin1D::getMidPoint. On-axis values are bounded by minimum/maximum values passed to the constructor.

Definition at line 32 of file PointwiseAxis.h.


The documentation for this class was generated from the following files: