diff options
author | Guest_account Guest_account prguest11 <prguest11@taipan.cs> | 2011-10-11 16:16:53 +0100 |
---|---|---|
committer | Guest_account Guest_account prguest11 <prguest11@taipan.cs> | 2011-10-11 16:16:53 +0100 |
commit | 08c4a7fae8f0bec4f76c4e0928e357100eb7a1ca (patch) | |
tree | 44030db9ef1625ce130ab08acfd308643d568d1f /gi/pf/itg.cc | |
parent | ffaae62e4f1cedabbc6eb1982af129e7294d33eb (diff) |
remove implicit conversion-to-double operator from LogVal<T> that caused overflow errors, clean up some pf code
Diffstat (limited to 'gi/pf/itg.cc')
-rw-r--r-- | gi/pf/itg.cc | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/gi/pf/itg.cc b/gi/pf/itg.cc index 2c2a86f9..ac3c16a3 100644 --- a/gi/pf/itg.cc +++ b/gi/pf/itg.cc @@ -27,17 +27,6 @@ ostream& operator<<(ostream& os, const vector<WordID>& p) { return os << ']'; } -size_t hash_value(const TRule& r) { - size_t h = boost::hash_value(r.e_); - boost::hash_combine(h, -r.lhs_); - boost::hash_combine(h, boost::hash_value(r.f_)); - return h; -} - -bool operator==(const TRule& a, const TRule& b) { - return (a.lhs_ == b.lhs_ && a.e_ == b.e_ && a.f_ == b.f_); -} - double log_poisson(unsigned x, const double& lambda) { assert(lambda > 0.0); return log(lambda) * x - lgamma(x + 1) - lambda; |