Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Mantid::API::FunctionDomain1D Class Reference

Represent a domain for functions of one real argument. More...

#include <FunctionDomain1D.h>

Inheritance diagram for Mantid::API::FunctionDomain1D:
Mantid::API::FunctionDomain Mantid::API::FunctionDomain1DHistogram Mantid::API::FunctionDomain1DVector Mantid::API::FunctionDomain1DView Mantid::API::FunctionDomain1DSpectrum

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...
 
FunctionDomain1Doperator= (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...
 

Detailed Description

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.

Author
Roman Tolchenov, Tessella plc
Date
15/11/2011

Definition at line 30 of file FunctionDomain1D.h.

Constructor & Destructor Documentation

◆ FunctionDomain1D() [1/2]

Mantid::API::FunctionDomain1D::FunctionDomain1D ( const FunctionDomain1D right)
delete

copying is not allowed.

◆ FunctionDomain1D() [2/2]

Mantid::API::FunctionDomain1D::FunctionDomain1D ( const double *  x,
size_t  n 
)
protected

Protected constructor, shouldn't be created directly.

The constructor.

Use FunctionDomain1DView instead.

Definition at line 15 of file FunctionDomain1D.cpp.

Member Function Documentation

◆ getPeakRadius()

int Mantid::API::FunctionDomain1D::getPeakRadius ( ) const

Get the peak radius.

Definition at line 35 of file FunctionDomain1D.cpp.

References m_peakRadius.

◆ getPointerAt()

const double * Mantid::API::FunctionDomain1D::getPointerAt ( size_t  i) const
inline

◆ operator=()

FunctionDomain1D & Mantid::API::FunctionDomain1D::operator= ( const FunctionDomain1D )
delete

copying is not allowed.

◆ operator[]()

double Mantid::API::FunctionDomain1D::operator[] ( size_t  i) const
inline

Get an x value.

Parameters
i:: Index

Definition at line 40 of file FunctionDomain1D.h.

References m_data.

◆ resetData()

void Mantid::API::FunctionDomain1D::resetData ( const double *  x,
size_t  n 
)
inlineprotected

◆ setPeakRadius()

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.

Parameters
radius:: New radius value.

Definition at line 30 of file FunctionDomain1D.cpp.

References m_peakRadius, and radius.

◆ size()

size_t Mantid::API::FunctionDomain1D::size ( ) const
inlineoverridevirtual

◆ toVector()

std::vector< double > Mantid::API::FunctionDomain1D::toVector ( ) const

Member Data Documentation

◆ m_data

const double* Mantid::API::FunctionDomain1D::m_data
private

pointer to the start of the domain data

Definition at line 62 of file FunctionDomain1D.h.

Referenced by toVector().

◆ m_n

size_t Mantid::API::FunctionDomain1D::m_n
private

size of the data

Definition at line 64 of file FunctionDomain1D.h.

Referenced by toVector().

◆ m_peakRadius

int Mantid::API::FunctionDomain1D::m_peakRadius
private

A peak radius that IPeakFunctions should use.

Definition at line 66 of file FunctionDomain1D.h.

Referenced by getPeakRadius(), and setPeakRadius().


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