Mercurial > hg > audiodb
comparison audioDB.cpp @ 58:7e18b5adce8c
Delete some (wrong) FIXME notes about off-by-one errors.
author | mas01cr |
---|---|
date | Thu, 20 Sep 2007 11:53:11 +0000 |
parents | 67de6f2c5f7d |
children | cd851d1fbc62 |
comparison
equal
deleted
inserted
replaced
57:67de6f2c5f7d | 58:7e18b5adce8c |
---|---|
1799 thisDist=thisDist; // Computed above | 1799 thisDist=thisDist; // Computed above |
1800 else | 1800 else |
1801 thisDist=1000000.0; | 1801 thisDist=1000000.0; |
1802 | 1802 |
1803 // k-NN match algorithm | 1803 // k-NN match algorithm |
1804 m=pointNN; /* FIXME: -1? distances[pointNN] */ | 1804 m=pointNN; |
1805 while(m--){ | 1805 while(m--){ |
1806 if(thisDist<=distances[m]) | 1806 if(thisDist<=distances[m]) |
1807 if(m==0 || thisDist>=distances[m-1]){ | 1807 if(m==0 || thisDist>=distances[m-1]){ |
1808 // Shuffle distances up the list | 1808 // Shuffle distances up the list |
1809 for(l=pointNN-1; l>m; l--){ | 1809 for(l=pointNN-1; l>m; l--){ |
1833 if(verbosity>3) | 1833 if(verbosity>3) |
1834 cerr << fileTable+track*O2_FILETABLESIZE << " " << thisDist << endl; | 1834 cerr << fileTable+track*O2_FILETABLESIZE << " " << thisDist << endl; |
1835 | 1835 |
1836 | 1836 |
1837 // All the track stuff goes here | 1837 // All the track stuff goes here |
1838 n=trackNN; /* FIXME: trackNN-1 */ | 1838 n=trackNN; |
1839 while(n--){ | 1839 while(n--){ |
1840 if(thisDist<=trackDistances[n]){ | 1840 if(thisDist<=trackDistances[n]){ |
1841 if((n==0 || thisDist>=trackDistances[n-1])){ | 1841 if((n==0 || thisDist>=trackDistances[n-1])){ |
1842 // Copy all values above up the queue | 1842 // Copy all values above up the queue |
1843 for( l=trackNN-1 ; l > n ; l--){ | 1843 for( l=trackNN-1 ; l > n ; l--){ |