summaryrefslogtreecommitdiff
path: root/decoder/hg.h
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-31 13:57:24 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-31 13:57:24 +0200
commit6f6601111710aa67eee5169e5b7d89102cc33bb8 (patch)
tree0872544abd6bc76162f3f80eb3920999afbf2c34 /decoder/hg.h
parent8cee8b565a9c56a7732365e9563f52ff3c4ff7fd (diff)
parent090a64e73f94a6a35e5364a9d416dcf75c0a2938 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'decoder/hg.h')
-rw-r--r--decoder/hg.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/decoder/hg.h b/decoder/hg.h
index dfa4ac6d..91d25f01 100644
--- a/decoder/hg.h
+++ b/decoder/hg.h
@@ -43,7 +43,7 @@ public:
Hypergraph() : is_linear_chain_(false) {}
// SmallVector is a fast, small vector<int> implementation for sizes <= 2
- typedef SmallVectorInt TailNodeVector; // indices in nodes_
+ typedef SmallVectorUnsigned TailNodeVector; // indices in nodes_
typedef std::vector<int> EdgesVector; // indices in edges_
// TODO get rid of cat_?
@@ -396,7 +396,7 @@ public:
// (inner product) to set the edge probabilities
template <class V>
void Reweight(const V& weights) {
- for (int i = 0; i < edges_.size(); ++i) {
+ for (unsigned i = 0; i < edges_.size(); ++i) {
Edge& e = edges_[i];
e.edge_prob_.logeq(e.feature_values_.dot(weights));
}
@@ -457,8 +457,6 @@ public:
void PruneUnreachable(int goal_node_id); // DEPRECATED
- void RemoveNoncoaccessibleStates(int goal_node_id = -1);
-
// remove edges from the hypergraph if prune_edge[edge_id] is true
// note: if run_inside_algorithm is false, then consumers may be unhappy if you pruned nodes that are built on by nodes that are kept.
void PruneEdges(const EdgeMask& prune_edge, bool run_inside_algorithm = false);
@@ -524,7 +522,7 @@ public:
template <class V>
void visit_edges(V &v) {
- for (int i=0;i<edges_.size();++i)
+ for (unsigned i=0;i<edges_.size();++i)
v(edges_[i].head_node_,i,edges_[i]);
}