39 return clone(parentWorkspace);
69 throw std::domain_error(
"This method cannot be used on a RefAxis.");
80 const auto *ra2 =
dynamic_cast<const RefAxis *
>(&axis2);
81 return ra2 !=
nullptr;
96 throw std::runtime_error(
"Calling indexOfValue() on RefAxis is forbidden.");
100 throw std::runtime_error(
"Calling createBinBoundaries() on RefAxis is forbidden.");
104 throw std::runtime_error(
"Calling getValues() on RefAxis is forbidded.");
108 throw std::runtime_error(
"RefAxis cannot determine minimum value. Use readX "
109 "on the workspace instead");
112 throw std::runtime_error(
"RefAxis cannot determine maximum value. Use readX "
113 "on the workspace instead");
double value
The value of the point.
std::map< DeltaEMode::Type, std::string > index
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Class to represent the axis of a workspace.
virtual std::size_t length() const =0
Get the length of the axis.
Base MatrixWorkspace Abstract Class.
const HistogramData::HistogramX & x(const size_t index) const
Class to represent a numeric axis of a workspace.
A class to represent the axis of a 2D (or more) workspace where the value at a given point on the axi...
std::vector< double > createBinBoundaries() const override
Create bin boundaries from the point values.
RefAxis(const MatrixWorkspace *const parentWorkspace)
Constructor.
std::size_t length() const override
Get the length of the axis.
Axis * clone(const MatrixWorkspace *const parentWorkspace) override
Virtual constructor.
bool operator==(const Axis &) const override
Check if two axis defined as spectra or numeric axis are equivalent.
const std::vector< double > & getValues() const override
Return a const reference to the values.
double getMax() const override
returns max value defined on axis
double getMin() const override
returns min value defined on axis
const MatrixWorkspace *const m_parentWS
A pointer to the workspace holding the axis.
size_t indexOfValue(const double value) const override
Returns the index of the value wrt bin edge representation of the axis.
double operator()(const std::size_t &index, const std::size_t &verticalIndex) const override
Get a value at the specified index.
void setValue(const std::size_t &index, const double &value) override
Method not available for RefAxis.
bool equalWithinTolerance(const Axis &axis2, const double tolerance) const override
Check if two numeric axis are equivalent to a given tolerance.
Exception for index errors.