14#include "MantidAlgorithms/DllConfig.h"
17#include "MantidHistogramData/Histogram.h"
45 const std::string
category()
const override {
return "Arithmetic"; }
59 Parallel::ExecutionMode
60 getParallelExecutionMode(
const std::map<std::string, Parallel::StorageMode> &storageModes)
const override;
68 bool handleSpecialDivideMinus();
104 HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) = 0;
116 HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) = 0;
138 virtual void performEventBinaryOperation(
DataObjects::EventList &lhs,
const MantidVec &rhsX,
const MantidVec &rhsY,
139 const MantidVec &rhsE);
148 virtual void performEventBinaryOperation(
DataObjects::EventList &lhs,
const double &rhsY,
const double &rhsE);
180 virtual void checkRequirements();
199 bool m_AllowDifferentNumberSpectra{
false};
201 bool m_ClearRHSWorkspace{
false};
210 bool m_matchXSize{
false};
214 bool m_flipSides{
false};
220 bool m_keepEventWorkspace{
false};
226 bool m_useHistogramForRhsEventWorkspace{
false};
232 bool m_do2D_even_for_SingleColumn_on_rhs{
false};
235 void doSingleValue();
236 void doSingleSpectrum();
237 void doSingleColumn();
238 void do2D(
bool mismatchedSpectra);
242 std::unique_ptr<API::Progress> m_progress =
nullptr;
const std::vector< double > & rhs
std::map< DeltaEMode::Type, std::string > index
Base class from which all concrete algorithm classes should be derived.
Base MatrixWorkspace Abstract Class.
This class stores information regarding an experimental run as a series of log entries.
API::SpectrumInfo is an intermediate step towards a SpectrumInfo that is part of Instrument-2....
BinaryOperation supports the implementation of a binary operation on two input workspaces.
virtual void operateOnRun(const API::Run &lhs, const API::Run &rhs, API::Run &ans) const
Only overridden by operations that affect the properties of the run (e.g.
size_t m_rhsBlocksize
Cache for RHS workspace's blocksize.
virtual void setOutputUnits(const API::MatrixWorkspace_const_sptr lhs, const API::MatrixWorkspace_const_sptr rhs, API::MatrixWorkspace_sptr out)
Should be overridden by operations that need to manipulate the units of the output workspace.
std::shared_ptr< BinaryOperationTable > BinaryOperationTable_sptr
DataObjects::EventWorkspace_sptr m_eout
Output EventWorkspace.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
API::MatrixWorkspace_sptr m_out
Output workspace.
virtual void performBinaryOperation(const HistogramData::Histogram &lhs, const double rhsY, const double rhsE, HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut)=0
Carries out the binary operation when the right hand operand is a single number.
virtual std::string outputPropName() const
The name of the output workspace property.
DataObjects::EventWorkspace_const_sptr m_erhs
Right-hand side EventWorkspace.
virtual void performBinaryOperation(const HistogramData::Histogram &lhs, const HistogramData::Histogram &rhs, HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut)=0
Carries out the binary operation on a single spectrum, with another spectrum as the right-hand operan...
size_t m_lhsBlocksize
Cache for LHS workspace's blocksize.
std::vector< int64_t > BinaryOperationTable
BinaryOperationTable: a list of ints.
virtual std::string inputPropName1() const
The name of the first input workspace property.
DataObjects::EventWorkspace_const_sptr m_elhs
Left-hand side EventWorkspace.
API::MatrixWorkspace_const_sptr m_rhs
Right-hand side workspace.
virtual std::string inputPropName2() const
The name of the second input workspace property.
API::MatrixWorkspace_const_sptr m_lhs
Left-hand side workspace.
~BinaryOperation()=default
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< const EventWorkspace > EventWorkspace_const_sptr
shared pointer to a const Workspace2D
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
Helper class which provides the Collimation Length for SANS instruments.