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

Axis with fixed bin size. More...

+ Inheritance diagram for FixedBinAxis:

Public Member Functions

 FixedBinAxis (const std::string &name, size_t nbins, double start, double end)
 FixedBinAxis constructor. More...
 
FixedBinAxisclone () const
 clone function
 
size_t size () const
 retrieve the number of bins
 
double operator[] (size_t index) const
 indexed accessor retrieves a sample
 
Bin1D getBin (size_t index) const
 retrieve a 1d bin for the given index
 
double getMin () const
 Returns value of first point of axis.
 
double getMax () const
 Returns value of last point of axis.
 
double getBinCenter (size_t index) const
 
size_t findClosestIndex (double value) const
 find bin index which is best match for given value
 
std::vector< double > getBinCenters () const
 
std::vector< double > getBinBoundaries () const
 
FixedBinAxiscreateClippedAxis (double left, double right) const
 Creates a new clipped axis.
 
std::string pyString (const std::string &units, size_t) 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.
 

Protected Member Functions

void print (std::ostream &ostr) const
 
virtual bool equals (const IAxis &other) const
 

Detailed Description

Axis with fixed bin size.

Definition at line 23 of file FixedBinAxis.h.

Constructor & Destructor Documentation

◆ FixedBinAxis()

FixedBinAxis::FixedBinAxis ( const std::string &  name,
size_t  nbins,
double  start,
double  end 
)

FixedBinAxis constructor.

Parameters
nameAxis name
nbinsnumber of bins
startlow edge of first bin
endupper edge of last bin

Definition at line 22 of file FixedBinAxis.cpp.


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