Skip to content

Commit 65c75ff

Browse files
committed
use std::unordered_set instead of boost::unordered_set for all instances in moses2. To avoid confusion
1 parent d3c2c0b commit 65c75ff

File tree

22 files changed

+23
-36
lines changed

22 files changed

+23
-36
lines changed

moses2/FF/StatefulFeatureFunction.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* Author: hieu
66
*/
77

8-
#ifndef STATEFULFEATUREFUNCTION_H_
9-
#define STATEFULFEATUREFUNCTION_H_
8+
#pragma once
109

1110
#include "FeatureFunction.h"
1211
#include "FFState.h"
@@ -63,4 +62,3 @@ class StatefulFeatureFunction: public FeatureFunction
6362

6463
}
6564

66-
#endif /* STATEFULFEATUREFUNCTION_H_ */

moses2/FF/StatelessFeatureFunction.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* Author: hieu
66
*/
77

8-
#ifndef STATELESSFEATUREFUNCTION_H_
9-
#define STATELESSFEATUREFUNCTION_H_
8+
#pragma once
109

1110
#include "FeatureFunction.h"
1211

@@ -22,4 +21,3 @@ class StatelessFeatureFunction: public FeatureFunction
2221

2322
}
2423

25-
#endif /* STATELESSFEATUREFUNCTION_H_ */

moses2/HypothesisColl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
#pragma once
88
#include <unordered_set>
9-
#include <boost/unordered_set.hpp>
109
#include "HypothesisBase.h"
1110
#include "MemPoolAllocator.h"
1211
#include "Recycler.h"

moses2/Main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void Temp()
107107
Moses2::MemPool pool;
108108
Moses2::MemPoolAllocator<int> a(pool);
109109

110-
boost::unordered_set<int, boost::hash<int>, std::equal_to<int>, Moses2::MemPoolAllocator<int> > s(a);
110+
std::unordered_set<int, boost::hash<int>, std::equal_to<int>, Moses2::MemPoolAllocator<int> > s(a);
111111
s.insert(3);
112112
s.insert(4);
113113
s.insert(3);

moses2/Phrase.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#pragma once
99

10+
#include <boost/functional/hash.hpp>
1011
#include <cstddef>
1112
#include <string>
1213
#include <sstream>

moses2/PhraseBased/CubePruningMiniStack/Misc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#pragma once
88
#include <boost/pool/pool_alloc.hpp>
99
#include <boost/unordered_map.hpp>
10-
#include <boost/unordered_set.hpp>
10+
#include <unordered_set>
1111
#include <vector>
1212
#include <queue>
1313
#include "../../legacy/Range.h"
@@ -70,7 +70,7 @@ class CubeEdge
7070
std::vector<QueueItem*, MemPoolAllocator<QueueItem*> >, QueueItemOrderer> Queue;
7171

7272
typedef std::pair<const CubeEdge*, int> SeenPositionItem;
73-
typedef boost::unordered_set<SeenPositionItem, boost::hash<SeenPositionItem>,
73+
typedef std::unordered_set<SeenPositionItem, boost::hash<SeenPositionItem>,
7474
std::equal_to<SeenPositionItem>, MemPoolAllocator<SeenPositionItem> > SeenPositions;
7575

7676
const Hypotheses &hypos;

moses2/PhraseBased/CubePruningMiniStack/Search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void Search::Decode(size_t stackInd)
110110

111111
/*
112112
cerr << "edges: ";
113-
boost::unordered_set<const Bitmap*> uniqueBM;
113+
std::unordered_set<const Bitmap*> uniqueBM;
114114
BOOST_FOREACH(CubeEdge *edge, edges) {
115115
uniqueBM.insert(&edge->newBitmap);
116116
//cerr << *edge << " ";

moses2/PhraseBased/CubePruningMiniStack/Stack.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
#pragma once
88
#include <boost/unordered_map.hpp>
9-
#include <boost/unordered_set.hpp>
109
#include <deque>
1110
#include "../Hypothesis.h"
1211
#include "../../TypeDef.h"

moses2/PhraseBased/Manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
#include <boost/foreach.hpp>
88
#include <boost/functional/hash.hpp>
9-
#include <boost/unordered_set.hpp>
9+
#include <unordered_set>
1010
#include <vector>
1111
#include <sstream>
1212
#include "Manager.h"
@@ -218,7 +218,7 @@ std::string Manager::OutputNBest()
218218
{
219219
arcLists.Sort();
220220

221-
boost::unordered_set<size_t> distinctHypos;
221+
std::unordered_set<size_t> distinctHypos;
222222

223223
TrellisPaths<TrellisPath> contenders;
224224
m_search->AddInitialTrellisPaths(contenders);

moses2/PhraseBased/Normal/Stack.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
#pragma once
88

9-
#include <boost/unordered_set.hpp>
109
#include <deque>
1110
#include "../Hypothesis.h"
1211
#include "../../TypeDef.h"

0 commit comments

Comments
 (0)