comparison 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
comparison
equal deleted inserted replaced
52:8cbc15519d2c 53:331a17753663
166 * 166 *
167 * @param i the frame number of this Matcher 167 * @param i the frame number of this Matcher
168 * @param j the frame number of the other Matcher 168 * @param j the frame number of the other Matcher
169 * @return the cost of the minimum cost path to this location 169 * @return the cost of the minimum cost path to this location
170 */ 170 */
171 float getValue(int i, int j, bool firstAttempt); 171 double getValue(int i, int j, bool firstAttempt);
172 172
173 /** Stores entries in the distance matrix and the optimal path matrix. 173 /** Stores entries in the distance matrix and the optimal path matrix.
174 * 174 *
175 * @param i the frame number of this Matcher 175 * @param i the frame number of this Matcher
176 * @param j the frame number of the other Matcher 176 * @param j the frame number of the other Matcher
177 * @param dir the direction from which this position is reached with 177 * @param dir the direction from which this position is reached with
178 * minimum cost 178 * minimum cost
179 * @param value the cost of the minimum path except the current step 179 * @param value the cost of the minimum path except the current step
180 * @param dMN the distance cost between the two frames 180 * @param dMN the distance cost between the two frames
181 */ 181 */
182 void setValue(int i, int j, Advance dir, float value, float dMN); 182 void setValue(int i, int j, Advance dir, double value, float dMN);
183 183
184 void calcAdvance(); 184 void calcAdvance();
185 185
186 /** Points to the other performance with which this one is being 186 /** Points to the other performance with which this one is being
187 * compared. The data for the distance metric and the dynamic 187 * compared. The data for the distance metric and the dynamic
219 * frames are received. One can think of the structure of the 219 * frames are received. One can think of the structure of the
220 * array as a circular buffer of vectors. */ 220 * array as a circular buffer of vectors. */
221 vector<vector<double> > m_frames; 221 vector<vector<double> > m_frames;
222 222
223 /** The best path cost matrix. */ 223 /** The best path cost matrix. */
224 vector<vector<float> > m_bestPathCost; 224 vector<vector<double> > m_bestPathCost;
225 225
226 /** The distance matrix. */ 226 /** The distance matrix. */
227 vector<vector<float> > m_distance; 227 vector<vector<float> > m_distance;
228 228
229 /** The advance direction matrix. */ 229 /** The advance direction matrix. */