summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-08-12 23:36:44 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-08-12 23:36:44 -0400
commit3f5bd140a20aa039788c0973d98f709d5747494b (patch)
tree05ae40e4537d91e8eb3951fd7b99f100d4faabb7
parentf8c3ef6cc06b010a2d76105bbd130600ad65bbd5 (diff)
redefine HG
-rw-r--r--decoder/hg_intersect.cc6
-rw-r--r--decoder/hg_intersect.h6
2 files changed, 7 insertions, 5 deletions
diff --git a/decoder/hg_intersect.cc b/decoder/hg_intersect.cc
index e9a91061..ad5b701a 100644
--- a/decoder/hg_intersect.cc
+++ b/decoder/hg_intersect.cc
@@ -79,7 +79,9 @@ static bool FastLinearIntersect(const Lattice& target, Hypergraph* hg) {
return (cov.size() == target.size());
}
-bool HG::Intersect(const Lattice& target, Hypergraph* hg) {
+namespace HG {
+
+bool Intersect(const Lattice& target, Hypergraph* hg) {
// there are a number of faster algorithms available for restricted
// classes of hypergraph and/or target.
if (hg->IsLinearChain() && target.IsSentence())
@@ -160,3 +162,5 @@ bool HG::Intersect(const Lattice& target, Hypergraph* hg) {
return true;
}
+}
+
diff --git a/decoder/hg_intersect.h b/decoder/hg_intersect.h
index 826bdaae..29a5ea2a 100644
--- a/decoder/hg_intersect.h
+++ b/decoder/hg_intersect.h
@@ -1,13 +1,11 @@
#ifndef _HG_INTERSECT_H_
#define _HG_INTERSECT_H_
-#include <vector>
-
#include "lattice.h"
class Hypergraph;
-struct HG {
- static bool Intersect(const Lattice& target, Hypergraph* hg);
+namespace HG {
+ bool Intersect(const Lattice& target, Hypergraph* hg);
};
#endif