17namespace DataObjects {
26 const std::string
id()
const override {
return "WorkspaceSingleValue"; }
29 const Parallel::StorageMode storageMode = Parallel::StorageMode::Cloned);
32 std::unique_ptr<WorkspaceSingleValue>
clone()
const {
return std::unique_ptr<WorkspaceSingleValue>(doClone()); }
34 std::unique_ptr<WorkspaceSingleValue>
cloneEmpty()
const {
35 return std::unique_ptr<WorkspaceSingleValue>(doCloneEmpty());
43 std::size_t
size()
const override {
return 1; }
46 std::size_t
blocksize()
const override {
return 1; }
59 invalidateCommonBinsFlag();
60 return getSpectrumWithoutInvalidation(
index);
65 bool skipError =
false)
const override;
68 size_t getNumDims()
const override;
79 void init(
const std::size_t &NVectors,
const std::size_t &XLength,
const std::size_t &YLength)
override;
80 void init(
const HistogramData::Histogram &histogram)
override;
83 Histogram1D data{HistogramData::Histogram::XMode::Points, HistogramData::Histogram::YMode::Counts};
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 ...
HistoWorkspace is an abstract base class for MatrixWorkspace types that are NOT event workspaces.
1D histogram implementation.
Concrete workspace implementation.
std::size_t size() const override
Returns the number of single indexable items in the workspace.
bool isRaggedWorkspace() const override
Returns true if the workspace is ragged (has differently sized spectra).
const Histogram1D & getSpectrum(const size_t) const override
Return the underlying ISpectrum ptr (const version) at the given workspace index.
std::size_t getMaxNumberBins() const override
Returns the maximum number of bins in a workspace.
WorkspaceSingleValue & operator=(const WorkspaceSingleValue &other)=delete
std::size_t getNumberBins(const std::size_t &index) const override
Returns the number of bins for a given histogram index.
const std::string id() const override
Gets the name of the workspace type.
WorkspaceSingleValue * doCloneEmpty() const override
Virtual cloneEmpty method.
Histogram1D & getSpectrum(const size_t index) override
Return the underlying ISpectrum ptr at the given workspace index.
std::size_t blocksize() const override
Returns the size of each block of data returned by the dataX accessors.
std::unique_ptr< WorkspaceSingleValue > cloneEmpty() const
Returns a default-initialized clone of the workspace.
WorkspaceSingleValue * doClone() const override
Virtual clone method. Not implemented to force implementation in children.
std::unique_ptr< WorkspaceSingleValue > clone() const
Returns a clone of the workspace.
std::size_t getNumberHistograms() const override
std::shared_ptr< WorkspaceSingleValue > WorkspaceSingleValue_sptr
shared pointer to the WorkspaceSingleValue class
std::shared_ptr< const WorkspaceSingleValue > WorkspaceSingleValue_const_sptr
Helper class which provides the Collimation Length for SANS instruments.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces