Mantid
|
Represent a domain for functions of one real argument. More...
#include <FunctionDomain1D.h>
Public Member Functions | |
FunctionDomain1D (const FunctionDomain1D &right)=delete | |
copying is not allowed. More... | |
int | getPeakRadius () const |
Get the peak radius. More... | |
const double * | getPointerAt (size_t i) const |
Get a pointer to i-th value. More... | |
FunctionDomain1D & | operator= (const FunctionDomain1D &)=delete |
copying is not allowed. More... | |
double | operator[] (size_t i) const |
Get an x value. More... | |
void | setPeakRadius (int radius) |
Set a peak radius to pass to peak functions. More... | |
size_t | size () const override |
Return the number of arguments in the domain. More... | |
std::vector< double > | toVector () const |
Convert to a vector. More... | |
Public Member Functions inherited from Mantid::API::FunctionDomain | |
virtual void | reset () const |
Reset the the domain so it can be reused. More... | |
virtual size_t | size () const =0 |
Return the number of points in the domain. More... | |
virtual | ~FunctionDomain ()=default |
Virtual destructor. More... | |
Protected Member Functions | |
FunctionDomain1D (const double *x, size_t n) | |
Protected constructor, shouldn't be created directly. More... | |
void | resetData (const double *x, size_t n) |
Reset the pointer and size of the domain. More... | |
Private Attributes | |
const double * | m_data |
pointer to the start of the domain data More... | |
size_t | m_n |
size of the data More... | |
int | m_peakRadius |
A peak radius that IPeakFunctions should use. More... | |
Represent a domain for functions of one real argument.
This class does not contain any data, only a pointer to it. It is not to be instantiated but serves as a base class for FunctionDomain1DVector and FunctionDomain1DView classes. The data access methods are not virtual for efficiency.
Definition at line 30 of file FunctionDomain1D.h.
|
delete |
copying is not allowed.
|
protected |
Protected constructor, shouldn't be created directly.
The constructor.
Use FunctionDomain1DView instead.
Definition at line 15 of file FunctionDomain1D.cpp.
int Mantid::API::FunctionDomain1D::getPeakRadius | ( | ) | const |
|
inline |
Get a pointer to i-th value.
Definition at line 42 of file FunctionDomain1D.h.
References m_data.
Referenced by Mantid::CurveFitting::Functions::PawleyFunction::calculateFunctionValues(), and Mantid::CurveFitting::ParameterEstimator::extractValues().
|
delete |
copying is not allowed.
|
inline |
Get an x value.
i | :: Index |
Definition at line 40 of file FunctionDomain1D.h.
References m_data.
|
inlineprotected |
Reset the pointer and size of the domain.
Definition at line 55 of file FunctionDomain1D.h.
References m_data, n, and Mantid::Geometry::x.
Referenced by Mantid::API::FunctionDomain1DHistogram::FunctionDomain1DHistogram(), Mantid::API::FunctionDomain1DVector::FunctionDomain1DVector(), and Mantid::API::FunctionDomain1DVector::operator=().
void Mantid::API::FunctionDomain1D::setPeakRadius | ( | int | radius | ) |
Set a peak radius to pass to peak functions.
Set a peak redius to pass to peak functions.
radius | :: New radius value. |
Definition at line 30 of file FunctionDomain1D.cpp.
References m_peakRadius, and radius.
|
inlineoverridevirtual |
Return the number of arguments in the domain.
Implements Mantid::API::FunctionDomain.
Definition at line 37 of file FunctionDomain1D.h.
Referenced by Mantid::CurveFitting::Algorithms::RefinePowderInstrumentParameters::calculateD2TOFFunction(), Mantid::CurveFitting::Functions::PawleyFunction::calculateFunctionValues(), Mantid::CurveFitting::Algorithms::FitPowderDiffPeaks::doFitMultiplePeaks(), Mantid::CurveFitting::Algorithms::FitPowderDiffPeaks::estimatePeakHeightsLeBail(), Mantid::CurveFitting::ParameterEstimator::extractValues(), Mantid::CurveFitting::Functions::ProcessBackground::filterForBackground(), Mantid::CurveFitting::Algorithms::RefinePowderInstrumentParameters::fitInstrumentParameters(), Mantid::CurveFitting::Algorithms::FitPowderDiffPeaks::plotFunction(), and Mantid::Algorithms::NormaliseByDetector::processHistogram().
std::vector< double > Mantid::API::FunctionDomain1D::toVector | ( | ) | const |
Convert to a vector.
Definition at line 18 of file FunctionDomain1D.cpp.
Referenced by Mantid::CurveFitting::Algorithms::RefinePowderInstrumentParameters3::genOutputWorkspace(), and Mantid::Algorithms::FitPeak::setupOutput().
|
private |
pointer to the start of the domain data
Definition at line 62 of file FunctionDomain1D.h.
Referenced by toVector().
|
private |
|
private |
A peak radius that IPeakFunctions should use.
Definition at line 66 of file FunctionDomain1D.h.
Referenced by getPeakRadius(), and setPeakRadius().