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

Implements FunctionDomain1D as a set of bins for a histogram. More...

#include <FunctionDomain1D.h>

Inheritance diagram for Mantid::API::FunctionDomain1DHistogram:
Mantid::API::FunctionDomain1D Mantid::API::FunctionDomain

Public Member Functions

 FunctionDomain1DHistogram (const FunctionDomain1DHistogram &)=delete
 Disable copy operator. More...
 
 FunctionDomain1DHistogram (const std::vector< double > &bins)
 Constructor. More...
 
 FunctionDomain1DHistogram (std::vector< double >::const_iterator from, std::vector< double >::const_iterator to)
 Constructor. More...
 
double leftBoundary () const
 Get the leftmost boundary. More...
 
FunctionDomain1DHistogramoperator= (const FunctionDomain1DHistogram &)=delete
 Disable assignment operator. More...
 
- Public Member Functions inherited from Mantid::API::FunctionDomain1D
 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 Attributes

std::vector< double > m_bins
 vector of bin boundaries More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::API::FunctionDomain1D
 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...
 

Detailed Description

Implements FunctionDomain1D as a set of bins for a histogram.

operator[i] returns the right boundary of i-th bin. The left boundary of the first bin (#0) is returned by leftBoundary() method.

Definition at line 138 of file FunctionDomain1D.h.

Constructor & Destructor Documentation

◆ FunctionDomain1DHistogram() [1/3]

Mantid::API::FunctionDomain1DHistogram::FunctionDomain1DHistogram ( const std::vector< double > &  bins)

Constructor.

Parameters
bins:: A vector with bin boundaries.

Definition at line 154 of file FunctionDomain1D.cpp.

◆ FunctionDomain1DHistogram() [2/3]

Mantid::API::FunctionDomain1DHistogram::FunctionDomain1DHistogram ( std::vector< double >::const_iterator  from,
std::vector< double >::const_iterator  to 
)

Constructor.

Create a domain from a part of a vector.

Parameters
from:: Iterator to start copying values from.
to:: Iterator to the end of the data.

Definition at line 162 of file FunctionDomain1D.cpp.

References m_bins, and Mantid::API::FunctionDomain1D::resetData().

◆ FunctionDomain1DHistogram() [3/3]

Mantid::API::FunctionDomain1DHistogram::FunctionDomain1DHistogram ( const FunctionDomain1DHistogram )
delete

Disable copy operator.

Member Function Documentation

◆ leftBoundary()

double Mantid::API::FunctionDomain1DHistogram::leftBoundary ( ) const

Get the leftmost boundary.

Definition at line 173 of file FunctionDomain1D.cpp.

References m_bins.

◆ operator=()

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

Disable assignment operator.

Member Data Documentation

◆ m_bins

std::vector<double> Mantid::API::FunctionDomain1DHistogram::m_bins
protected

vector of bin boundaries

Definition at line 155 of file FunctionDomain1D.h.

Referenced by FunctionDomain1DHistogram(), and leftBoundary().


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