28 if (lhs->size() ==
rhs->size()) {
31 return "Workspaces not identically sized.";
36 HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) {
40 const auto bins =
static_cast<int>(lhs.e().size());
41 for (
int j = 0; j < bins; ++j) {
42 if (
rhs.y()[j] != 0.0)
43 EOut[j] =
rhs.e()[j] /
rhs.y()[j] * lhs.y()[j];
50 HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) {
52 assert(lhs.x().size() == 1);
57 EOut[0] = rhsE / rhsY * lhs.y()[0];
#define DECLARE_ALGORITHM(classname)
const std::vector< double > & rhs
Takes a Data workspace and an original counts workspace input and updates the error values in the dat...
void performBinaryOperation(const HistogramData::Histogram &lhs, const HistogramData::Histogram &rhs, HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) override
Carries out the binary operation on a single spectrum, with another spectrum as the right-hand operan...
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)