summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-09-08 13:24:11 +0200
committerChris Dyer <cdyer@cs.cmu.edu>2011-09-08 13:24:11 +0200
commit51e8f4a5b9ffc96f3486ede77fe4511918156cf4 (patch)
tree93950686ce63c197301c18a44db834431b12a385 /decoder
parente73e7925a1b2fce06b1cdbe13e53fe6f10d56261 (diff)
fix viterbi to work with non prob_t types
Diffstat (limited to 'decoder')
-rw-r--r--decoder/viterbi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/viterbi.h b/decoder/viterbi.h
index ac0b9a11..daee3d7a 100644
--- a/decoder/viterbi.h
+++ b/decoder/viterbi.h
@@ -25,7 +25,7 @@ typename WeightFunction::Weight Viterbi(const Hypergraph& hg,
typedef typename WeightFunction::Weight WeightType;
const int num_nodes = hg.nodes_.size();
std::vector<T> vit_result(num_nodes);
- std::vector<WeightType> vit_weight(num_nodes, WeightType::Zero());
+ std::vector<WeightType> vit_weight(num_nodes, WeightType());
for (int i = 0; i < num_nodes; ++i) {
const Hypergraph::Node& cur_node = hg.nodes_[i];