comparison NoteHypothesis.cpp @ 34:3fb9c657d86b

Expand hypothesis tests
author Chris Cannam
date Fri, 13 Jul 2012 22:48:02 +0100
parents c88a9972975b
children 2f5b169e4a3b
comparison
equal deleted inserted replaced
33:5f2a57b1a75a 34:3fb9c657d86b
132 132
133 double 133 double
134 NoteHypothesis::getMeanFrequency() const 134 NoteHypothesis::getMeanFrequency() const
135 { 135 {
136 double acc = 0.0; 136 double acc = 0.0;
137 if (m_pending.empty()) return acc;
137 for (int i = 0; i < (int)m_pending.size(); ++i) { 138 for (int i = 0; i < (int)m_pending.size(); ++i) {
138 acc += m_pending[i].freq; 139 acc += m_pending[i].freq;
139 } 140 }
140 acc /= m_pending.size(); 141 acc /= m_pending.size();
141 return acc; 142 return acc;