changeset 96:6b91e40b2c04 refactors

Tidy
author Chris Cannam
date Thu, 27 Nov 2014 16:50:14 +0000
parents bc3b60d65a5f
children bdd8158d401f 593054bf6476 5bfac082b0c8
files src/Finder.cpp src/Matcher.cpp src/Matcher.h
diffstat 3 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/Finder.cpp	Thu Nov 27 16:05:24 2014 +0000
+++ b/src/Finder.cpp	Thu Nov 27 16:50:14 2014 +0000
@@ -85,7 +85,6 @@
     } else {
         return Matcher::AdvanceNone;
     }
-
 }
 
 void
--- a/src/Matcher.cpp	Thu Nov 27 16:05:24 2014 +0000
+++ b/src/Matcher.cpp	Thu Nov 27 16:50:14 2014 +0000
@@ -377,16 +377,16 @@
 }
 
 void
-Matcher::updateValue(int i, int j, Advance dir, double value, float dMN)
+Matcher::updateValue(int i, int j, Advance dir, double value, float distance)
 {
-    float weighted = dMN;
+    float weighted = distance;
     if (dir == AdvanceBoth) {
         weighted *= m_params.diagonalWeight;
     }
     
     if (m_firstPM) {
 
-        m_distance[i][j - m_first[i]] = dMN;
+        setDistance(i, j, distance);
         setPathCost(i, j, dir, value + weighted);
 
     } else {
@@ -406,7 +406,7 @@
             m_otherMatcher->m_advance[j].resize(idx * 2, AdvanceNone);
         }
 
-        m_otherMatcher->m_distance[j][idx] = dMN;
+        m_otherMatcher->setDistance(j, i, distance);
         m_otherMatcher->setPathCost(j, i, dir, value + weighted);
     }
 }
--- a/src/Matcher.h	Thu Nov 27 16:05:24 2014 +0000
+++ b/src/Matcher.h	Thu Nov 27 16:50:14 2014 +0000
@@ -220,7 +220,7 @@
      *  @param j the frame number of the other Matcher
      *  @param value the distance metric to set for this location
      */
-    void setDistance(int i, int j, float value);
+    void setDistance(int i, int j, float distance);
     
     /** Retrieves a value from the minimum cost matrix.
      *