diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-16 19:11:03 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-16 19:11:03 +0000 |
commit | 24e1af8ce18759c66f7b1b57cc9656214362034f (patch) | |
tree | 21c3a89044ea5c5077e13ec3e781f0fed07ff11d | |
parent | 17bef2a7df49f132c7146c50d49ca1af6f2301b0 (diff) |
fixed
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@563 ec762483-ff6d-05da-a07a-a48fb63a330f
-rwxr-xr-x | decoder/cfg.cc | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/decoder/cfg.cc b/decoder/cfg.cc index b0d4eab6..4d5bf801 100755 --- a/decoder/cfg.cc +++ b/decoder/cfg.cc @@ -214,6 +214,23 @@ WordID BinName(RHS const& b,CFG::NTs const& N,CFG::NTs const& M) } template <class Rhs> +struct null_for; + +typedef CFG::BinRhs BinRhs; + +template <> +struct null_for<BinRhs> { + static BinRhs null; +}; +BinRhs null_for<BinRhs>::null(std::numeric_limits<int>::min(),std::numeric_limits<int>::min()); + +template <> +struct null_for<RHS> { + static RHS null; +}; +RHS null_for<RHS>::null(1,std::numeric_limits<int>::min()); + +template <class Rhs> struct add_virtual_rules { typedef CFG::RuleHandle RuleHandle; typedef CFG::NTHandle NTHandle; @@ -343,24 +360,6 @@ struct add_virtual_rules { } }; - -template <class Rhs> -struct null_for; - -typedef CFG::BinRhs BinRhs; - -template <> -struct null_for<BinRhs> { - static BinRhs null; -}; -BinRhs null_for<BinRhs>::null(std::numeric_limits<int>::min(),std::numeric_limits<int>::min()); - -template <> -struct null_for<RHS> { - static RHS null; -}; -RHS null_for<RHS>::null(1,std::numeric_limits<int>::min()); - }//ns void CFG::BinarizeSplit(CFGBinarize const& b) { |