summaryrefslogtreecommitdiff
path: root/training/mr_em_map_adapter.cc
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-04-22 13:38:32 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2011-04-22 13:38:32 -0400
commit9986bc8fe11435b2134350bba24aa0139d2665ac (patch)
treed27b526d929b788dcdc2b1ab949c608a4751edfe /training/mr_em_map_adapter.cc
parent5061409a26050b9a4724b50b30d66d3c3a583951 (diff)
make compatible with FastSparseVector
Diffstat (limited to 'training/mr_em_map_adapter.cc')
-rw-r--r--training/mr_em_map_adapter.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/training/mr_em_map_adapter.cc b/training/mr_em_map_adapter.cc
index a98e1b77..ead4598d 100644
--- a/training/mr_em_map_adapter.cc
+++ b/training/mr_em_map_adapter.cc
@@ -132,9 +132,9 @@ int main(int argc, char** argv) {
for (SparseVector<double>::const_iterator it = cg.begin(); it != cg.end(); ++it) {
const int cond_var = event_mapper->Map(it->first);
SparseVector<double>& cond_counts = counts[cond_var];
- int delta = cond_counts.num_active();
+ int delta = cond_counts.size();
cond_counts.add_value(it->first, it->second);
- delta = cond_counts.num_active() - delta;
+ delta = cond_counts.size() - delta;
total += delta;
}
if (total > buffer_size) {