BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
FixedBinAxis Class Reference

Description

Axis with fixed bin size.

Inheritance diagram for FixedBinAxis:

Public Member Functions

 FixedBinAxis (const std::string &name, size_t nbins, double start, double end)
 FixedBinAxis constructor. More...
 
 ~FixedBinAxis () override=default
 
Bin1D bin (size_t index) const override
 
std::vector< double > binBoundaries () const override
 
double binCenter (size_t index) const override
 
std::vector< double > binCenters () const override
 
void clip (double lower, double upper) override
 
FixedBinAxisclone () const override
 
size_t findClosestIndex (double value) const override
 
double max () const override
 
double min () const override
 
double operator[] (size_t index) const override
 
size_t size () const override
 

Protected Member Functions

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

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

◆ ~FixedBinAxis()

FixedBinAxis::~FixedBinAxis ( )
overridedefault

Member Function Documentation

◆ bin()

Bin1D FixedBinAxis::bin ( size_t  index) const
override

◆ binBoundaries()

std::vector<double> FixedBinAxis::binBoundaries ( ) const
override

◆ binCenter()

double FixedBinAxis::binCenter ( size_t  index) const
override

◆ binCenters()

std::vector<double> FixedBinAxis::binCenters ( ) const
override

◆ clip()

void FixedBinAxis::clip ( double  lower,
double  upper 
)
override

◆ clone()

FixedBinAxis* FixedBinAxis::clone ( ) const
override

◆ equals()

bool FixedBinAxis::equals ( const IAxis &  other) const
overrideprotected

◆ findClosestIndex()

size_t FixedBinAxis::findClosestIndex ( double  value) const
override

◆ max()

double FixedBinAxis::max ( ) const
override

◆ min()

double FixedBinAxis::min ( ) const
override

◆ operator[]()

double FixedBinAxis::operator[] ( size_t  index) const
override

◆ print()

void FixedBinAxis::print ( std::ostream &  ostr) const
overrideprotected

◆ size()

size_t FixedBinAxis::size ( ) const
override