Mercurial > hg > match-vamp
diff src/Matcher.h @ 53:331a17753663 refactors
If the distance metric is a float, the total path cost should be a double (otherwise discriminatory precision is lost as the overall total accumulates)
author | Chris Cannam |
---|---|
date | Fri, 14 Nov 2014 10:09:10 +0000 |
parents | c7aa28f0d2ac |
children | 19a93b15fcc3 |
line wrap: on
line diff
--- a/src/Matcher.h Fri Nov 14 09:45:56 2014 +0000 +++ b/src/Matcher.h Fri Nov 14 10:09:10 2014 +0000 @@ -168,7 +168,7 @@ * @param j the frame number of the other Matcher * @return the cost of the minimum cost path to this location */ - float getValue(int i, int j, bool firstAttempt); + double getValue(int i, int j, bool firstAttempt); /** Stores entries in the distance matrix and the optimal path matrix. * @@ -179,7 +179,7 @@ * @param value the cost of the minimum path except the current step * @param dMN the distance cost between the two frames */ - void setValue(int i, int j, Advance dir, float value, float dMN); + void setValue(int i, int j, Advance dir, double value, float dMN); void calcAdvance(); @@ -221,7 +221,7 @@ vector<vector<double> > m_frames; /** The best path cost matrix. */ - vector<vector<float> > m_bestPathCost; + vector<vector<double> > m_bestPathCost; /** The distance matrix. */ vector<vector<float> > m_distance;