# HG changeset patch # User Chris Cannam # Date 1425039718 0 # Node ID 010b91e440984ed1fbcca6ad8c33eff2c9403a0c # Parent 006fd4cb95b33f03d5f117857c7c2abb435060c0 Rename getRowRange/getColRange to make nature of arg clearer diff -r 006fd4cb95b3 -r 010b91e44098 src/Finder.cpp --- a/src/Finder.cpp Fri Feb 27 12:20:32 2015 +0000 +++ b/src/Finder.cpp Fri Feb 27 12:21:58 2015 +0000 @@ -58,7 +58,7 @@ Finder::getBestRowCost(int row, int &bestCol, normpathcost_t &min) { if (!m_m->isRowAvailable(row)) return false; - pair colRange = m_m->getColRange(row); + pair colRange = m_m->getColRangeForRow(row); if (colRange.first >= colRange.second) return false; for (int index = colRange.first; index < colRange.second; index++) { normpathcost_t tmp = m_m->getNormalisedPathCost(row, index); @@ -74,7 +74,7 @@ Finder::getBestColCost(int col, int &bestRow, normpathcost_t &min) { if (!m_m->isColAvailable(col)) return false; - pair rowRange = m_m->getRowRange(col); + pair rowRange = m_m->getRowRangeForCol(col); if (rowRange.first >= rowRange.second) return false; bestRow = rowRange.first; for (int index = rowRange.first; index < rowRange.second; index++) { @@ -99,7 +99,7 @@ bestRow = row; bestCol = col; - pair rowRange = m_m->getRowRange(col); + pair rowRange = m_m->getRowRangeForCol(col); if (rowRange.second > row+1) { rowRange.second = row+1; // don't cheat by looking at future :) } @@ -111,7 +111,7 @@ } } - pair colRange = m_m->getColRange(row); + pair colRange = m_m->getColRangeForRow(row); if (colRange.second > col+1) { colRange.second = col+1; // don't cheat by looking at future :) } @@ -177,7 +177,7 @@ for (int r = r1; r <= r2; r++) { - pair colRange = m_m->getColRange(r); + pair colRange = m_m->getColRangeForRow(r); int rowStart = max(c1, colRange.first); int rowStop = min(c2 + 1, colRange.second); @@ -246,7 +246,7 @@ for (int r = r1; r <= r2; r++) { - pair colRange = m_m->getColRange(r); + pair colRange = m_m->getColRangeForRow(r); int rowStart = max(c1, colRange.first); int rowStop = min(c2 + 1, colRange.second); diff -r 006fd4cb95b3 -r 010b91e44098 src/Matcher.cpp --- a/src/Matcher.cpp Fri Feb 27 12:20:32 2015 +0000 +++ b/src/Matcher.cpp Fri Feb 27 12:21:58 2015 +0000 @@ -138,7 +138,7 @@ } pair -Matcher::getColRange(int i) +Matcher::getColRangeForRow(int i) { if (m_firstPM) { if (i < 0 || i >= int(m_first.size())) { @@ -149,12 +149,12 @@ return pair(m_first[i], m_last[i]); } } else { - return m_otherMatcher->getRowRange(i); + return m_otherMatcher->getRowRangeForCol(i); } } pair -Matcher::getRowRange(int j) +Matcher::getRowRangeForCol(int j) { if (m_firstPM) { @@ -176,7 +176,7 @@ } } else { - return m_otherMatcher->getColRange(j); + return m_otherMatcher->getColRangeForRow(j); } } diff -r 006fd4cb95b3 -r 010b91e44098 src/Matcher.h --- a/src/Matcher.h Fri Feb 27 12:20:32 2015 +0000 +++ b/src/Matcher.h Fri Feb 27 12:21:58 2015 +0000 @@ -188,7 +188,7 @@ * Matcher. Note that the last frame is exclusive (last valid * frame + 1). */ - std::pair getColRange(int i); + std::pair getColRangeForRow(int i); /** Returns the valid range of rows for the given column, that is, * the range of frames in this Matcher for the given frame in the @@ -199,7 +199,7 @@ * Matcher. Note that the last frame is exclusive (last valid * frame + 1). */ - std::pair getRowRange(int i); + std::pair getRowRangeForCol(int i); /** Retrieves a value from the distance matrix. *