Mercurial > hg > match-vamp
changeset 214:97cc0b9135e7
Refer to distances rather than path costs for availability (in case we deem old path costs surplus to requirement for live tracking)
author | Chris Cannam |
---|---|
date | Thu, 05 Mar 2015 09:47:15 +0000 |
parents | 2fcd1c14f0f6 |
children | 0df914e353e1 |
files | src/Matcher.cpp |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Matcher.cpp Fri Feb 27 14:27:34 2015 +0000 +++ b/src/Matcher.cpp Thu Mar 05 09:47:15 2015 +0000 @@ -81,7 +81,7 @@ { if (m_firstPM) { if (isInRange(i, j)) { - return (m_bestPathCost[i][j - m_first[i]] != INVALID_PATHCOST); + return (m_distance[i][j - m_first[i]] != INVALID_DISTANCE); } else { return false; } @@ -96,8 +96,8 @@ if (m_firstPM) { if (i < 0 || i >= int(m_first.size())) return false; - for (auto c: m_bestPathCost[i]) { - if (c != INVALID_PATHCOST) return true; + for (auto c: m_distance[i]) { + if (c != INVALID_DISTANCE) return true; } return false; @@ -112,7 +112,7 @@ if (m_firstPM) { for (int i = 0; i < int(m_first.size()); ++i) { if (j >= m_first[i] && j < m_last[i]) { - if (m_bestPathCost[i][j - m_first[i]] != INVALID_PATHCOST) { + if (m_distance[i][j - m_first[i]] != INVALID_DISTANCE) { return true; } } @@ -130,7 +130,7 @@ return ((i >= 0) && (i < int(m_first.size())) && (j >= m_first[i]) && - (j < int(m_first[i] + m_bestPathCost[i].size()))); + (j < int(m_first[i] + m_distance[i].size()))); } else { return m_otherMatcher->isInRange(j, i); }