Skip to content
Snippets Groups Projects
Commit 610fdd7f authored by Hahn, Steven's avatar Hahn, Steven
Browse files

fix build issues


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