Mantid
Loading...
Searching...
No Matches
Minus.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
9
10namespace Mantid {
11namespace Algorithms {
28class MANTID_ALGORITHMS_DLL Minus : public BinaryOperation {
29public:
31 const std::string name() const override { return "Minus"; }
33 const std::string summary() const override {
34 return "The Minus algorithm will subtract the data values and calculate "
35 "the corresponding error values for two compatible workspaces.";
36 }
37
39 const std::string alias() const override;
41 int version() const override { return 1; }
42 const std::vector<std::string> seeAlso() const override { return {"Plus", "Divide", "Multiply"}; }
43
44private:
45 // Overridden BinaryOperation methods
46 void performBinaryOperation(const HistogramData::Histogram &lhs, const HistogramData::Histogram &rhs,
47 HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) override;
48 void performBinaryOperation(const HistogramData::Histogram &lhs, const double rhsY, const double rhsE,
49 HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) override;
50 void performEventBinaryOperation(DataObjects::EventList &lhs, const DataObjects::EventList &rhs) override;
51 void performEventBinaryOperation(DataObjects::EventList &lhs, const MantidVec &rhsX, const MantidVec &rhsY,
52 const MantidVec &rhsE) override;
53 void performEventBinaryOperation(DataObjects::EventList &lhs, const double &rhsY, const double &rhsE) override;
54
55 void checkRequirements() override;
56 std::string checkSizeCompatibility(const API::MatrixWorkspace_const_sptr lhs,
57 const API::MatrixWorkspace_const_sptr rhs) const override;
58 bool checkUnitCompatibility(const API::MatrixWorkspace_const_sptr &lhs,
60 bool checkCompatibility(const API::MatrixWorkspace_const_sptr lhs,
61 const API::MatrixWorkspace_const_sptr rhs) const override;
62};
63
64} // namespace Algorithms
65} // namespace Mantid
const std::vector< double > & rhs
BinaryOperation supports the implementation of a binary operation on two input workspaces.
Minus performs the difference of two input workspaces.
Definition: Minus.h:28
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Definition: Minus.h:42
int version() const override
Algorithm's version for identification overriding a virtual method.
Definition: Minus.h:41
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
Definition: Minus.h:31
const std::string summary() const override
Summary of algorithms purpose.
Definition: Minus.h:33
A class for holding :
Definition: EventList.h:56
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
Helper class which provides the Collimation Length for SANS instruments.