Commit 610fdd7f authored by Hahn, Steven's avatar Hahn, Steven
Browse files

fix build issues



Signed-off-by: Hahn, Steven's avatarSteven Hahn <hahnse@ornl.gov>
parent 7cb380f2
......@@ -514,20 +514,19 @@ public:
// Check if this class has an oriented lattice on a sample object
virtual bool hasOrientedLattice() const override;
virtual std::pair<size_t, size_t> find(double value)
:
virtual std::pair<int64_t, int64_t> find(double value) const;
//=====================================================================================
// End IMDWorkspace methods
//=====================================================================================
//=====================================================================================
// End IMDWorkspace methods
//=====================================================================================
//=====================================================================================
// Image methods
//=====================================================================================
//=====================================================================================
// Image methods
//=====================================================================================
/// Get start and end x indices for images
std::pair<size_t, size_t> getImageStartEndXIndices(
size_t i, double startX, double endX) const;
/// Get start and end x indices for images
std::pair<size_t, size_t> getImageStartEndXIndices(size_t i, double startX,
double endX) const;
/// Create an image of Ys.
MantidImage_sptr getImageY(size_t start = 0, size_t stop = 0,
size_t width = 0, double startX = EMPTY_DBL(),
......
......@@ -1931,14 +1931,13 @@ MantidImage_sptr MatrixWorkspace::getImage(
return image;
}
std::pair<size_t, size_t> MatrixWorkspace::find(double value) {
std::pair<size_t, size_t> out(-1, -1);
const int64_t numHists =
static_cast<int64_t>(inputWorkspace->getNumberHistograms());
std::pair<int64_t, int64_t> MatrixWorkspace::find(double value) const {
std::pair<int64_t, int64_t> out(-1, -1);
const int64_t numHists = static_cast<int64_t>(this->getNumberHistograms());
for (int64_t i = 0; i < numHists; ++i) {
const auto &Y = inputEventWorkspace->y(i);
if (auto it = std::find(Y.begin(), Y.end(), 0.), it != Y.end()) {
out = {i, std::distance(Y.begin().it)};
const auto &Y = this->y(i);
if (auto it = std::find(Y.begin(), Y.end(), value); it != Y.end()) {
out = {i, std::distance(Y.begin(), it)};
break;
}
}
......
......@@ -7,6 +7,7 @@
#include "MantidAlgorithms/SetUncertainties.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/SpectrumInfo.h"
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidGeometry/IDetector.h"
#include "MantidGeometry/Instrument.h"
......@@ -124,7 +125,7 @@ void SetUncertainties::exec() {
double valueToSet = resetOne ? 1.0 : getProperty("SetErrorTo");
double valueToCompare = resetOne ? 0.0 : getProperty("IfEqualTo");
int precision = getProperty("Precision");
double tolerance = resetOne ? 1E-10 : std::pow(10.0, std : negate(precision));
double tolerance = resetOne ? 1E-10 : std::pow(10.0, -1. * precision);
// Create the output workspace. This will copy many aspects from the input
// one.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment