Mercurial > hg > silvet
comparison src/Silvet.cpp @ 37:947996aac974
Calculate column sums, etc
author | Chris Cannam |
---|---|
date | Fri, 04 Apr 2014 18:18:18 +0100 |
parents | 74b77a4d6552 |
children | 5164bccf3064 |
comparison
equal
deleted
inserted
replaced
36:74b77a4d6552 | 37:947996aac974 |
---|---|
294 int width = filtered.size(); | 294 int width = filtered.size(); |
295 | 295 |
296 int iterations = 12; | 296 int iterations = 12; |
297 | 297 |
298 for (int i = 0; i < width; ++i) { | 298 for (int i = 0; i < width; ++i) { |
299 | |
300 double sum = 0.0; | |
301 for (int j = 0; j < processingHeight; ++j) { | |
302 sum += filtered[i][j]; | |
303 } | |
304 cerr << "sum = " << sum << endl; | |
305 | |
306 if (sum < 1e-5) continue; | |
307 | |
299 EM em; | 308 EM em; |
300 for (int j = 0; j < iterations; ++j) { | 309 for (int j = 0; j < iterations; ++j) { |
301 em.iterate(filtered[i]); | 310 em.iterate(filtered[i]); |
302 } | 311 } |
312 | |
303 //!!! now do something with the results from em! | 313 //!!! now do something with the results from em! |
304 em.report(); | 314 em.report(); |
305 } | 315 } |
306 | 316 |
307 return fs; | 317 return fs; |