Commit f044de9c authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Reformat codebase with clang-format 6.0

parent 1e924cdb
......@@ -381,11 +381,10 @@ public:
const auto &wavelength = outWS->points(wsIndex);
for (size_t binIndex = 0; binIndex < (xValues.size() - 1); ++binIndex) {
const double expectedValue =
yInputValues[binIndex] /
((2 * wavelength[binIndex]) +
1); // According to the equation written into
// the instrument parameter file for the
// instrument component link.
yInputValues[binIndex] / ((2 * wavelength[binIndex]) +
1); // According to the equation written
// into the instrument parameter file
// for the instrument component link.
TS_ASSERT_EQUALS(expectedValue, yValues[binIndex]);
const double expectedError =
(eInputValues[binIndex] * expectedValue) /
......@@ -440,11 +439,10 @@ public:
for (size_t binIndex = 0; binIndex < (xInputValues.size() - 1);
++binIndex) {
const double expectedValue =
yInputValues[binIndex] /
((2 * wavelength[binIndex]) +
1); // According to the equation written into
// the instrument parameter file for the
// instrument component link.
yInputValues[binIndex] / ((2 * wavelength[binIndex]) +
1); // According to the equation written
// into the instrument parameter file
// for the instrument component link.
// Compare against the known/calculated value.
TS_ASSERT_EQUALS(expectedValue, yValuesParallel[binIndex]);
// Compare results from different execution types.
......
......@@ -21,6 +21,8 @@
#include "MantidDataObjects/TableColumn.h"
#include "MantidKernel/Diffraction.h"
using Mantid::Algorithms::CreateSampleWorkspace;
using Mantid::Algorithms::PDCalibration;
using Mantid::API::AnalysisDataService;
using Mantid::API::FrameworkManager;
using Mantid::API::ITableWorkspace;
......@@ -28,8 +30,6 @@ using Mantid::API::ITableWorkspace_sptr;
using Mantid::API::MatrixWorkspace;
using Mantid::API::MatrixWorkspace_const_sptr;
using Mantid::API::Workspace_sptr;
using Mantid::Algorithms::CreateSampleWorkspace;
using Mantid::Algorithms::PDCalibration;
using Mantid::DataHandling::MoveInstrumentComponent;
using Mantid::DataHandling::RotateInstrumentComponent;
......
......@@ -18,8 +18,8 @@
#include <vector>
using namespace Mantid::API;
using Mantid::Algorithms::PaddingAndApodization;
using Mantid::MantidVec;
using Mantid::Algorithms::PaddingAndApodization;
namespace {
struct yData {
......
......@@ -18,12 +18,12 @@
#include "MantidGeometry/Instrument/DetectorInfo.h"
#include "MantidKernel/V3D.h"
using Mantid::API::FrameworkManager;
using Mantid::API::MatrixWorkspace_sptr;
using Mantid::Algorithms::CompareWorkspaces;
using Mantid::Algorithms::CreateSampleWorkspace;
using Mantid::Algorithms::ParallaxCorrection;
using Mantid::Algorithms::SetInstrumentParameter;
using Mantid::API::FrameworkManager;
using Mantid::API::MatrixWorkspace_sptr;
using Mantid::Geometry::DetectorInfo;
using Mantid::Kernel::V3D;
......
......@@ -32,8 +32,8 @@ using namespace Mantid::DataObjects;
using namespace Mantid::API;
using namespace Mantid::Algorithms;
using Mantid::HistogramData::BinEdges;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountStandardDeviations;
namespace {
......
......@@ -22,8 +22,8 @@ using namespace Mantid::DataObjects;
using namespace Mantid::API;
using namespace Mantid::Algorithms;
using Mantid::HistogramData::BinEdges;
using Mantid::HistogramData::CountVariances;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountVariances;
using Mantid::HistogramData::LinearGenerator;
using Mantid::HistogramData::Points;
......
......@@ -21,8 +21,8 @@ using namespace Mantid::DataObjects;
using namespace Mantid::API;
using namespace Mantid::Algorithms;
using Mantid::HistogramData::BinEdges;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::LinearGenerator;
class RegroupTest : public CxxTest::TestSuite {
......
......@@ -20,12 +20,12 @@
using namespace Mantid;
using namespace Mantid::API;
using namespace Mantid::DataObjects;
using Mantid::MantidVec;
using Mantid::Algorithms::ResampleX;
using Mantid::HistogramData::BinEdges;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Histogram;
using Mantid::MantidVec;
using std::vector;
class ResampleXTest : public CxxTest::TestSuite {
......
......@@ -236,9 +236,9 @@ public:
private:
static double k(const double E) {
using namespace Mantid;
using PhysicalConstants::NeutronMass;
using PhysicalConstants::h_bar;
using PhysicalConstants::meV;
using PhysicalConstants::NeutronMass;
return std::sqrt(2 * NeutronMass * E * meV) / h_bar * 1e-10;
}
......
......@@ -29,8 +29,8 @@ using namespace Mantid::API;
using namespace Mantid::Algorithms;
using namespace Mantid::DataObjects;
using Mantid::HistogramData::BinEdges;
using Mantid::HistogramData::CountVariances;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountVariances;
class SolidAngleTest : public CxxTest::TestSuite {
public:
......
......@@ -20,8 +20,8 @@
using namespace Mantid::API;
using namespace Mantid::HistogramData;
using namespace Mantid::Kernel::VectorHelper;
using Mantid::Algorithms::StripVanadiumPeaks2;
using Mantid::MantidVec;
using Mantid::Algorithms::StripVanadiumPeaks2;
class StripVanadiumPeaks2Test : public CxxTest::TestSuite {
public:
......@@ -95,9 +95,8 @@ public:
// known positions and expected values
const std::vector<double> PEAK_X{1.2356, 1.5133,
2.1401}; // peak positions in d-spacing
const std::vector<double> PEAK_Y{28.5, 37.8,
12.3}; // low precision results of
// stripped peaks
const std::vector<double> PEAK_Y{28.5, 37.8, 12.3}; // low precision results
// of stripped peaks
// something is wrong with the second peak on windows
const std::vector<double> TOL{.1, 10., .1};
......
......@@ -26,8 +26,8 @@ using namespace Mantid::Kernel;
using namespace Mantid::Algorithms;
using namespace Mantid::DataObjects;
using namespace Mantid::Geometry;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountStandardDeviations;
class WorkspaceGroupTest : public CxxTest::TestSuite {
private:
......
......@@ -300,10 +300,9 @@ public:
std::vector<size_t>{0, 1, 2});
auto bankSortedComponentIndices =
boost::make_shared<const std::vector<size_t>>(std::vector<size_t>(1));
auto parentIndices =
boost::make_shared<const std::vector<size_t>>(std::vector<size_t>{
9, 9, 9, 9}); // These indices are invalid, but that's
// ok as not being tested here
auto parentIndices = boost::make_shared<const std::vector<size_t>>(
std::vector<size_t>{9, 9, 9, 9}); // These indices are invalid, but
// that's ok as not being tested here
auto detectorRanges =
boost::make_shared<const std::vector<std::pair<size_t, size_t>>>(
1, std::pair<size_t, size_t>{0, 2});
......
......@@ -353,7 +353,7 @@ indexPeaks(const std::vector<Peak *> &peaks, DblMatrix ub,
std::vector<V3D> qSample(nPeaks);
std::generate(
std::begin(qSample), std::end(qSample),
[&peaks, i = 0u ]() mutable { return peaks[i++]->getQSampleFrame(); });
[&peaks, i = 0u]() mutable { return peaks[i++]->getQSampleFrame(); });
if (optimizeUB) {
ub = optimizeUBMatrix(ub, qSample, mainTolerance);
......
......@@ -154,10 +154,9 @@ void PeaksIntersection::executePeaksIntersection(const bool checkPeakExtents) {
// the box faces.
{
// Check that it is actually within the face boundaries.
const V3D touchPoint =
(normals[j] * distance) +
peakCenter; // Vector equation of line give touch
// point on plane.
const V3D touchPoint = (normals[j] * distance) +
peakCenter; // Vector equation of line give
// touch point on plane.
// checkTouchPoint(touchPoint, normals[i], faces[i][0]); //
// Debugging line.
......
......@@ -194,8 +194,10 @@ public:
MockBackgroundStrategy mockStrategy;
EXPECT_CALL(mockStrategy, configureIterator(_)).Times(1);
/*
* We use the is background strategy to set up three disconected blocks for us.
* */ EXPECT_CALL(mockStrategy, isBackground(_))
* We use the is background strategy to set up three disconected blocks for
* us.
* */
EXPECT_CALL(mockStrategy, isBackground(_))
.WillOnce(Return(false))
.WillOnce(Return(true)) // is background
.WillOnce(Return(false))
......@@ -255,8 +257,10 @@ public:
EXPECT_CALL(mockStrategy, configureIterator(_)).Times(1);
/*
* We treat alternate cells as background, which actually should result in a single object. Think of a chequered flag.
* */ EXPECT_CALL(mockStrategy, isBackground(_))
* We treat alternate cells as background, which actually should result in a
* single object. Think of a chequered flag.
* */
EXPECT_CALL(mockStrategy, isBackground(_))
.WillOnce(Return(true))
.WillOnce(Return(false))
.WillOnce(Return(true))
......@@ -300,8 +304,10 @@ public:
EXPECT_CALL(mockStrategy, configureIterator(_)).Times(1);
/*
* We treat alternate cells as background, which actually should result in a single object. Think of a chequered flag.
* */ EXPECT_CALL(mockStrategy, isBackground(_))
* We treat alternate cells as background, which actually should result in a
* single object. Think of a chequered flag.
* */
EXPECT_CALL(mockStrategy, isBackground(_))
.WillOnce(Return(true))
.WillOnce(Return(false))
.WillOnce(Return(true))
......
......@@ -28,8 +28,8 @@ using namespace Mantid::CurveFitting;
using namespace Mantid::API;
using namespace Mantid::DataObjects;
using Mantid::HistogramData::BinEdges;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::Kernel::make_cow;
using ConvolutionFitSequential =
......
......@@ -29,8 +29,8 @@ using namespace WorkspaceCreationHelper;
using namespace std;
using Mantid::CurveFitting::Algorithms::LeBailFit;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Points;
namespace {
......
......@@ -25,8 +25,8 @@ using Mantid::CurveFitting::Algorithms::QENSFitSequential;
using namespace Mantid::API;
using namespace Mantid::DataObjects;
using Mantid::HistogramData::BinEdges;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::Kernel::make_cow;
class QENSFitSequentialTest : public CxxTest::TestSuite {
......
......@@ -27,8 +27,8 @@ using Mantid::CurveFitting::Algorithms::QENSFitSimultaneous;
using namespace Mantid::API;
using namespace Mantid::DataObjects;
using Mantid::HistogramData::BinEdges;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::HistogramData::Counts;
using Mantid::HistogramData::CountStandardDeviations;
using Mantid::Kernel::make_cow;
class QENSFitSimultaneousTest : public CxxTest::TestSuite {
......
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