|
Mantid
|
Implements FunctionDomain1D with its own storage in form of a std::vector. More...
#include <FunctionDomain1D.h>
Public Member Functions | |
| FunctionDomain1DVector (const double startX, const double endX, const size_t n) | |
| Constructor. More... | |
| FunctionDomain1DVector (const double x) | |
| Constructor. More... | |
| FunctionDomain1DVector (const FunctionDomain1DVector &) | |
| Copy constructor. More... | |
| FunctionDomain1DVector (const std::vector< double > &xvalues) | |
| Constructor. More... | |
| FunctionDomain1DVector (std::vector< double > &&xvalues) | |
| No-copy constructor. More... | |
| FunctionDomain1DVector (std::vector< double >::const_iterator from, std::vector< double >::const_iterator to) | |
| Constructor. More... | |
| std::vector< double > | getVector () |
| Get the underlying vector. More... | |
| FunctionDomain1DVector & | operator= (const FunctionDomain1DVector &) |
| Copy 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... | |
| 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 Attributes | |
| std::vector< double > | m_X |
| vector of function arguments 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... | |
Implements FunctionDomain1D with its own storage in form of a std::vector.
Definition at line 72 of file FunctionDomain1D.h.
| Mantid::API::FunctionDomain1DVector::FunctionDomain1DVector | ( | const double | x | ) |
Constructor.
Create a domain with a single value.
| x | :: The argument value. |
Definition at line 107 of file FunctionDomain1D.cpp.
References m_X, Mantid::API::FunctionDomain1D::resetData(), and Mantid::Geometry::x.
| Mantid::API::FunctionDomain1DVector::FunctionDomain1DVector | ( | const double | startX, |
| const double | endX, | ||
| const size_t | n | ||
| ) |
Constructor.
Create a domain with regular values in an interval.
The step in values is (endX - startX) / (n - 1). If n == 1 creates a single value of (startX + endX) / 2.
| startX | :: The start of an interval. |
| endX | :: The end of an interval. |
| n | :: Number of values to create. |
Definition at line 86 of file FunctionDomain1D.cpp.
References m_X, n, and Mantid::API::FunctionDomain1D::resetData().
| Mantid::API::FunctionDomain1DVector::FunctionDomain1DVector | ( | const std::vector< double > & | xvalues | ) |
Constructor.
Create a domain from a vector.
| xvalues | :: Vector with function arguments to be copied from. |
Definition at line 41 of file FunctionDomain1D.cpp.
References m_X, and Mantid::API::FunctionDomain1D::resetData().
| Mantid::API::FunctionDomain1DVector::FunctionDomain1DVector | ( | std::vector< double > && | xvalues | ) |
No-copy constructor.
Create a domain from a vector using move semantics - no copy overhead.
| xvalues | :: Vector with function arguments to be moved from. |
Definition at line 53 of file FunctionDomain1D.cpp.
References m_X, and Mantid::API::FunctionDomain1D::resetData().
| Mantid::API::FunctionDomain1DVector::FunctionDomain1DVector | ( | std::vector< double >::const_iterator | from, |
| std::vector< double >::const_iterator | to | ||
| ) |
Constructor.
Create a domain from a part of a vector.
| from | :: Iterator to start copying values from. |
| to | :: Iterator to the end of the data. |
Definition at line 68 of file FunctionDomain1D.cpp.
References m_X, and Mantid::API::FunctionDomain1D::resetData().
| Mantid::API::FunctionDomain1DVector::FunctionDomain1DVector | ( | const FunctionDomain1DVector & | right | ) |
Copy constructor.
| right | :: The other domain. |
Definition at line 117 of file FunctionDomain1D.cpp.
References right.
|
inline |
Get the underlying vector.
Definition at line 89 of file FunctionDomain1D.h.
| FunctionDomain1DVector & Mantid::API::FunctionDomain1DVector::operator= | ( | const FunctionDomain1DVector & | right | ) |
Copy assignment operator.
| right | :: The other domain. |
Definition at line 125 of file FunctionDomain1D.cpp.
References m_X, Mantid::API::FunctionDomain1D::resetData(), and right.
|
protected |
vector of function arguments
Definition at line 92 of file FunctionDomain1D.h.
Referenced by FunctionDomain1DVector(), and operator=().