Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
commit6249432407af8730c10bccc7894c0725fcaf5e47 (patch)
tree3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /moses/RuleCube.h
parent59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff)
beautify
Diffstat (limited to 'moses/RuleCube.h')
-rw-r--r--moses/RuleCube.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/moses/RuleCube.h b/moses/RuleCube.h
index 05f9f1a24..d0c6ea66a 100644
--- a/moses/RuleCube.h
+++ b/moses/RuleCube.h
@@ -44,7 +44,7 @@ class ChartTranslationOptions;
*/
class RuleCubeItemScoreOrderer
{
- public:
+public:
bool operator()(const RuleCubeItem *p, const RuleCubeItem *q) const {
return p->GetScore() < q->GetScore();
}
@@ -56,7 +56,7 @@ class RuleCubeItemScoreOrderer
*/
class RuleCubeItemPositionOrderer
{
- public:
+public:
bool operator()(const RuleCubeItem *p, const RuleCubeItem *q) const {
return *p < *q;
}
@@ -66,7 +66,7 @@ class RuleCubeItemPositionOrderer
*/
class RuleCubeItemHasher
{
- public:
+public:
size_t operator()(const RuleCubeItem *p) const {
size_t seed = 0;
boost::hash_combine(seed, p->GetHypothesisDimensions());
@@ -79,7 +79,7 @@ class RuleCubeItemHasher
*/
class RuleCubeItemEqualityPred
{
- public:
+public:
bool operator()(const RuleCubeItem *p, const RuleCubeItem *q) const {
return p->GetHypothesisDimensions() == q->GetHypothesisDimensions() &&
p->GetTranslationDimension() == q->GetTranslationDimension();
@@ -90,7 +90,7 @@ class RuleCubeItemEqualityPred
*/
class RuleCube
{
- public:
+public:
RuleCube(const ChartTranslationOptions &, const ChartCellCollection &,
ChartManager &);
@@ -104,26 +104,28 @@ class RuleCube
RuleCubeItem *Pop(ChartManager &);
- bool IsEmpty() const { return m_queue.empty(); }
+ bool IsEmpty() const {
+ return m_queue.empty();
+ }
const ChartTranslationOptions &GetTranslationOption() const {
return m_transOpt;
}
- private:
+private:
#if defined(BOOST_VERSION) && (BOOST_VERSION >= 104200)
typedef boost::unordered_set<RuleCubeItem*,
- RuleCubeItemHasher,
- RuleCubeItemEqualityPred
- > ItemSet;
+ RuleCubeItemHasher,
+ RuleCubeItemEqualityPred
+ > ItemSet;
#else
typedef std::set<RuleCubeItem*, RuleCubeItemPositionOrderer> ItemSet;
#endif
typedef std::priority_queue<RuleCubeItem*,
- std::vector<RuleCubeItem*>,
- RuleCubeItemScoreOrderer
- > Queue;
+ std::vector<RuleCubeItem*>,
+ RuleCubeItemScoreOrderer
+ > Queue;
RuleCube(const RuleCube &); // Not implemented
RuleCube &operator=(const RuleCube &); // Not implemented