Skip to content

Commit

Permalink
refs #9115. Rename class and associated files.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Mar 14, 2014
1 parent cc04534 commit 7e08cf1
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 37 deletions.
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/Crystal/CMakeLists.txt
Expand Up @@ -6,7 +6,7 @@ set ( SRC_FILES
src/CentroidPeaks.cpp
src/ClearUB.cpp
src/CombinePeaksWorkspaces.cpp
src/ConnectedComponentLabelling.cpp
src/ConnectedComponentLabeling.cpp
src/DiffPeaksWorkspaces.cpp
src/DisjointElement.cpp
src/FilterPeaks.cpp
Expand Down Expand Up @@ -66,7 +66,7 @@ set ( INC_FILES
inc/MantidCrystal/CentroidPeaks.h
inc/MantidCrystal/ClearUB.h
inc/MantidCrystal/CombinePeaksWorkspaces.h
inc/MantidCrystal/ConnectedComponentLabelling.h
inc/MantidCrystal/ConnectedComponentLabeling.h
inc/MantidCrystal/DiffPeaksWorkspaces.h
inc/MantidCrystal/DisjointElement.h
inc/MantidCrystal/FilterPeaks.h
Expand Down Expand Up @@ -125,7 +125,7 @@ set ( TEST_FILES
CentroidPeaksTest.h
ClearUBTest.h
CombinePeaksWorkspacesTest.h
ConnectedComponentLabellingTest.h
ConnectedComponentLabelingTest.h
DiffPeaksWorkspacesTest.h
DisjointElementTest.h
FilterPeaksTest.h
Expand Down
@@ -1,5 +1,5 @@
#ifndef MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELLING_H_
#define MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELLING_H_
#ifndef MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELING_H_
#define MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELING_H_

#include "MantidKernel/System.h"
#include "MantidAPI/IMDHistoWorkspace.h"
Expand Down Expand Up @@ -33,13 +33,13 @@ namespace Crystal
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport ConnectedComponentLabelling
class DLLExport ConnectedComponentLabeling
{
public:
ConnectedComponentLabelling();
ConnectedComponentLabeling();
void startLabelingId(const size_t& id);
boost::shared_ptr<Mantid::API::IMDHistoWorkspace> execute(Mantid::API::IMDHistoWorkspace_sptr ws, BackgroundStrategy * const strategy) const;
virtual ~ConnectedComponentLabelling();
virtual ~ConnectedComponentLabeling();
private:
size_t m_startId;

Expand All @@ -49,4 +49,4 @@ namespace Crystal
} // namespace Crystal
} // namespace Mantid

#endif /* MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELLING_H_ */
#endif /* MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELING_H_ */
@@ -1,7 +1,7 @@
#include "MantidAPI/IMDHistoWorkspace.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/IMDIterator.h"
#include "MantidCrystal/ConnectedComponentLabelling.h"
#include "MantidCrystal/ConnectedComponentLabeling.h"
#include "MantidCrystal/BackgroundStrategy.h"
#include "MantidCrystal/DisjointElement.h"
#include <boost/shared_ptr.hpp>
Expand All @@ -24,7 +24,7 @@ namespace Mantid
//----------------------------------------------------------------------------------------------
/** Constructor
*/
ConnectedComponentLabelling::ConnectedComponentLabelling() : m_startId(1)
ConnectedComponentLabeling::ConnectedComponentLabeling() : m_startId(1)
{
}

Expand All @@ -33,7 +33,7 @@ namespace Mantid
* the initial id used.
* @param id: Id to start with
*/
void ConnectedComponentLabelling::startLabelingId(const size_t& id)
void ConnectedComponentLabeling::startLabelingId(const size_t& id)
{
if(id < 1)
throw std::invalid_argument("Start labeling id must be >= 1");
Expand All @@ -43,11 +43,11 @@ namespace Mantid
//----------------------------------------------------------------------------------------------
/** Destructor
*/
ConnectedComponentLabelling::~ConnectedComponentLabelling()
ConnectedComponentLabeling::~ConnectedComponentLabeling()
{
}

boost::shared_ptr<Mantid::API::IMDHistoWorkspace> ConnectedComponentLabelling::execute(
boost::shared_ptr<Mantid::API::IMDHistoWorkspace> ConnectedComponentLabeling::execute(
IMDHistoWorkspace_sptr ws, BackgroundStrategy * const strategy) const
{

Expand Down
@@ -1,5 +1,5 @@
#ifndef MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELLINGTEST_H_
#define MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELLINGTEST_H_
#ifndef MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELINGTEST_H_
#define MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELINGTEST_H_

#include <cxxtest/TestSuite.h>
#include <gmock/gmock.h>
Expand All @@ -10,7 +10,7 @@

#include "MantidAPI/IMDIterator.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidCrystal/ConnectedComponentLabelling.h"
#include "MantidCrystal/ConnectedComponentLabeling.h"
#include "MantidCrystal/BackgroundStrategy.h"
#include "MantidCrystal/HardThresholdBackground.h"
#include "MantidTestHelpers/MDEventsTestHelper.h"
Expand Down Expand Up @@ -51,7 +51,7 @@ namespace
//=====================================================================================
// Functional Tests
//=====================================================================================
class ConnectedComponentLabellingTest: public CxxTest::TestSuite
class ConnectedComponentLabelingTest: public CxxTest::TestSuite
{
private:

Expand All @@ -70,12 +70,12 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static ConnectedComponentLabellingTest *createSuite()
{ return new ConnectedComponentLabellingTest();}
static void destroySuite( ConnectedComponentLabellingTest *suite )
static ConnectedComponentLabelingTest *createSuite()
{ return new ConnectedComponentLabelingTest();}
static void destroySuite( ConnectedComponentLabelingTest *suite )
{ delete suite;}

ConnectedComponentLabellingTest() : m_emptyLabel(0)
ConnectedComponentLabelingTest() : m_emptyLabel(0)
{
FrameworkManager::Instance();
}
Expand All @@ -87,7 +87,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
MockBackgroundStrategy mockStrategy;
EXPECT_CALL(mockStrategy, isBackground(_)).Times(inWS->getNPoints()).WillRepeatedly(Return(false));// A filter that passes everything.

ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 1;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(inWS, &mockStrategy);
Expand All @@ -106,7 +106,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
MockBackgroundStrategy mockStrategy;
EXPECT_CALL(mockStrategy, isBackground(_)).Times(inWS->getNPoints()).WillRepeatedly(Return(false));// A filter that passes everything.

ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 2;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(inWS, &mockStrategy);
Expand Down Expand Up @@ -137,7 +137,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
.WillOnce(Return(true)) // is background
.WillRepeatedly(Return(false));

ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 1;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(inWS, &mockStrategy);
Expand Down Expand Up @@ -167,7 +167,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
.WillOnce(Return(true))// is background
.WillOnce(Return(false));

ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 1;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(inWS, &mockStrategy);
Expand All @@ -189,7 +189,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
MockBackgroundStrategy mockStrategy;

EXPECT_CALL(mockStrategy, isBackground(_)).WillRepeatedly(Return(false));// Nothing is treated as background
ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 1;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(inWS, &mockStrategy);
Expand Down Expand Up @@ -220,7 +220,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
.WillOnce(Return(false))
.WillOnce(Return(true));

ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 1;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(inWS, &mockStrategy);
Expand Down Expand Up @@ -252,7 +252,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
.WillOnce(Return(false)).WillOnce(Return(true)).WillOnce(Return(false))
.WillOnce(Return(true)).WillOnce(Return(false)).WillOnce(Return(true));

ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 1;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(inWS, &mockStrategy);
Expand Down Expand Up @@ -312,7 +312,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
// ---------- Run the cluster finding
HardThresholdBackground strategy(backgroundSignal, NoNormalization);

ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 1;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(inWS, &strategy);
Expand Down Expand Up @@ -350,7 +350,7 @@ class ConnectedComponentLabellingTest: public CxxTest::TestSuite
//=====================================================================================
// Performance Tests
//=====================================================================================
class ConnectedComponentLabellingTestPerformance: public CxxTest::TestSuite
class ConnectedComponentLabelingTestPerformance: public CxxTest::TestSuite
{
private:

Expand All @@ -362,17 +362,17 @@ class ConnectedComponentLabellingTestPerformance: public CxxTest::TestSuite
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static ConnectedComponentLabellingTestPerformance *createSuite()
static ConnectedComponentLabelingTestPerformance *createSuite()
{
return new ConnectedComponentLabellingTestPerformance();
return new ConnectedComponentLabelingTestPerformance();
}
static void destroySuite(ConnectedComponentLabellingTestPerformance *suite)
static void destroySuite(ConnectedComponentLabelingTestPerformance *suite)
{
delete suite;
}


ConnectedComponentLabellingTestPerformance() : m_backgroundSignal(0), m_backgroundStrategy(new HardThresholdBackground(0, NoNormalization))
ConnectedComponentLabelingTestPerformance() : m_backgroundSignal(0), m_backgroundStrategy(new HardThresholdBackground(0, NoNormalization))
{
FrameworkManager::Instance();

Expand All @@ -397,7 +397,7 @@ class ConnectedComponentLabellingTestPerformance: public CxxTest::TestSuite

void testPerformance()
{
ConnectedComponentLabelling ccl;
ConnectedComponentLabeling ccl;
size_t labelingId = 1;
ccl.startLabelingId(labelingId);
auto outWS = ccl.execute(m_inWS, m_backgroundStrategy.get());
Expand All @@ -412,4 +412,4 @@ class ConnectedComponentLabellingTestPerformance: public CxxTest::TestSuite

};

#endif /* MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELLINGTEST_H_ */
#endif /* MANTID_CRYSTAL_CONNECTEDCOMPONENTLABELINGTEST_H_ */

0 comments on commit 7e08cf1

Please sign in to comment.