Mercurial > hg > silvet
comparison src/EM.cpp @ 103:e6b4235fa2ea bqvec
Update results, tidy a bit
author | Chris Cannam |
---|---|
date | Tue, 06 May 2014 16:05:05 +0100 |
parents | 19f6832fdc8a |
children | 9b299b087dd4 |
comparison
equal
deleted
inserted
replaced
102:19f6832fdc8a | 103:e6b4235fa2ea |
---|---|
208 m_updateShifts[f][n] += total; | 208 m_updateShifts[f][n] += total; |
209 } | 209 } |
210 } | 210 } |
211 } | 211 } |
212 | 212 |
213 for (int n = 0; n < m_noteCount; ++n) { | 213 if (m_pitchSparsity != 1.0) { |
214 if (m_pitchSparsity != 1.0) { | 214 for (int n = 0; n < m_noteCount; ++n) { |
215 m_updatePitches[n] = pow(m_updatePitches[n], m_pitchSparsity); | 215 m_updatePitches[n] = |
216 } | 216 pow(m_updatePitches[n], m_pitchSparsity); |
217 if (m_sourceSparsity != 1.0) { | 217 } |
218 } | |
219 | |
220 if (m_sourceSparsity != 1.0) { | |
221 for (int n = 0; n < m_noteCount; ++n) { | |
218 for (int i = 0; i < m_sourceCount; ++i) { | 222 for (int i = 0; i < m_sourceCount; ++i) { |
219 m_updateSources[i][n] = pow(m_updateSources[i][n], m_sourceSparsity); | 223 m_updateSources[i][n] = |
224 pow(m_updateSources[i][n], m_sourceSparsity); | |
220 } | 225 } |
221 } | 226 } |
222 } | 227 } |
223 | 228 |
224 normaliseColumn(m_updatePitches, m_noteCount); | 229 normaliseColumn(m_updatePitches, m_noteCount); |