diff options
author | Chris Dyer <cdyer@cab.ark.cs.cmu.edu> | 2012-10-15 23:20:41 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cab.ark.cs.cmu.edu> | 2012-10-15 23:20:41 -0400 |
commit | 21a8287a2e1451db41c35494647c7b8c3e7e5adc (patch) | |
tree | 3f8632d3a11706ce0705da21ddf96ad8318a7011 /decoder/hg_io.cc | |
parent | 070d51e5554cc9840d97556d04bfa64a3d60b38c (diff) |
get rid of nested class that was causing header polution
Diffstat (limited to 'decoder/hg_io.cc')
-rw-r--r-- | decoder/hg_io.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder/hg_io.cc b/decoder/hg_io.cc index 3a68a429..8f604c89 100644 --- a/decoder/hg_io.cc +++ b/decoder/hg_io.cc @@ -392,8 +392,8 @@ string HypergraphIO::AsPLF(const Hypergraph& hg, bool include_global_parentheses const Hypergraph::Edge& e = hg.edges_[hg.nodes_[i].out_edges_[j]]; const string output = e.rule_->e_.size() ==2 ? Escape(TD::Convert(e.rule_->e_[1])) : EPS; double prob = log(e.edge_prob_); - if (isinf(prob)) { prob = -9e20; } - if (isnan(prob)) { prob = 0; } + if (std::isinf(prob)) { prob = -9e20; } + if (std::isnan(prob)) { prob = 0; } os << "('" << output << "'," << prob << "," << e.head_node_ - i << "),"; } os << "),"; |