summaryrefslogtreecommitdiff
path: root/decoder/hg.cc
diff options
context:
space:
mode:
authorGuest_account Guest_account prguest11 <prguest11@taipan.cs>2011-10-11 16:16:53 +0100
committerGuest_account Guest_account prguest11 <prguest11@taipan.cs>2011-10-11 16:16:53 +0100
commit0af7d663194beddcde420349bbd91430e0b2e423 (patch)
treef79558499f3756757b94267285ccd1418e55b8ea /decoder/hg.cc
parent4671d578bd6d97105ac75b02e0144fe0df3abcb0 (diff)
remove implicit conversion-to-double operator from LogVal<T> that caused overflow errors, clean up some pf code
Diffstat (limited to 'decoder/hg.cc')
-rw-r--r--decoder/hg.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder/hg.cc b/decoder/hg.cc
index 3ad17f1a..180986d7 100644
--- a/decoder/hg.cc
+++ b/decoder/hg.cc
@@ -157,14 +157,14 @@ prob_t Hypergraph::ComputeEdgePosteriors(double scale, vector<prob_t>* posts) co
const ScaledEdgeProb weight(scale);
const ScaledTransitionEventWeightFunction w2(scale);
SparseVector<prob_t> pv;
- const double inside = InsideOutside<prob_t,
+ const prob_t inside = InsideOutside<prob_t,
ScaledEdgeProb,
SparseVector<prob_t>,
ScaledTransitionEventWeightFunction>(*this, &pv, weight, w2);
posts->resize(edges_.size());
for (int i = 0; i < edges_.size(); ++i)
(*posts)[i] = prob_t(pv.value(i));
- return prob_t(inside);
+ return inside;
}
prob_t Hypergraph::ComputeBestPathThroughEdges(vector<prob_t>* post) const {