9#include "MantidAPI/DllConfig.h"
40 const std::string &title()
const;
43 const std::shared_ptr<Kernel::Unit> &unit()
const;
44 std::shared_ptr<Kernel::Unit> &unit();
47 virtual const std::shared_ptr<Kernel::Unit> &setUnit(
const std::string &unitName);
54 virtual bool isText()
const {
return false; }
59 virtual double operator()(
const std::size_t &
index,
const std::size_t &verticalIndex = 0)
const = 0;
62 double getValue(
const std::size_t &
index,
const std::size_t &verticalIndex = 0)
const;
78 virtual std::size_t
length()
const = 0;
87 virtual std::string
label(
const std::size_t &
index)
const = 0;
97 std::shared_ptr<Kernel::Unit>
m_unit;
double value
The value of the point.
std::map< DeltaEMode::Type, std::string > index
Class to represent the axis of a workspace.
virtual double getMin() const =0
returns min value defined on axis
virtual double getMax() const =0
returns max value defined on axis
virtual std::string label(const std::size_t &index) const =0
Returns a text label of for a value Note that the index here is not the index of a value,...
Axis(const Axis &)=default
std::shared_ptr< Kernel::Unit > m_unit
The unit for this axis.
virtual double operator()(const std::size_t &index, const std::size_t &verticalIndex=0) const =0
Returns the value at a specified index.
virtual bool isText() const
Returns true if the axis is Text.
virtual size_t indexOfValue(const double value) const =0
Find the index of the given double value.
virtual std::size_t length() const =0
Get the length of the axis.
virtual Axis * clone(const MatrixWorkspace *const parentWorkspace)=0
Virtual constructor.
Axis & operator=(const Axis &)=default
virtual Axis * clone(const std::size_t length, const MatrixWorkspace *const parentWorkspace)=0
Virtual constructor for axis of different length.
virtual bool operator==(const Axis &) const =0
Check whether two axis are the same, i.e same length and same spectra_values for all elements in the ...
virtual void setValue(const std::size_t &index, const double &value)=0
Sets the value at the specified index.
std::string m_title
The user-defined title for this axis.
virtual bool isNumeric() const
Returns true if the axis is numeric.
virtual bool isSpectra() const
Returns true is the axis is a Spectra axis.
Base MatrixWorkspace Abstract Class.
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.