Commit cabe132e6928a5a1de1626d6b7729f21caee0706

Authored by Scott Klum
1 parent 0a275cfb

Renamed OperationDistance to FuseDistance

Showing 1 changed file with 5 additions and 10 deletions
openbr/plugins/distance.cpp
... ... @@ -179,11 +179,11 @@ BR_REGISTER(Distance, PipeDistance)
179 179  
180 180 /*!
181 181 * \ingroup distances
182   - * \brief Computes an operation on distances across multiple matrices of compared templates
  182 + * \brief Fuses similarity scores across multiple matrices of compared templates
183 183 * \author Scott Klum \cite sklum
184 184 * \note Operation: Mean, sum, min, max are supported.
185 185 */
186   -class OperationDistance : public Distance
  186 +class FuseDistance : public Distance
187 187 {
188 188 Q_OBJECT
189 189 Q_ENUMS(Operation)
... ... @@ -222,13 +222,8 @@ private:
222 222 if (a.size() != b.size()) qFatal("Comparison size mismatch");
223 223  
224 224 QList<float> scores;
225   - for (int i=0; i<distances.size(); i++) {
226   - Template ai = a.file;
227   - ai.m() = a[i];
228   - Template bi = b.file;
229   - bi.m() = b[i];
230   - scores.append(distances[i]->compare(ai,bi));
231   - }
  225 + for (int i=0; i<distances.size(); i++)
  226 + scores.append(distances[i]->compare(Template(a.file, a[i]),Template(b.file, b[i])));
232 227  
233 228 switch (operation) {
234 229 case Mean:
... ... @@ -266,7 +261,7 @@ private:
266 261 }
267 262 };
268 263  
269   -BR_REGISTER(Distance, OperationDistance)
  264 +BR_REGISTER(Distance, FuseDistance)
270 265  
271 266 /*!
272 267 * \ingroup distances
... ...