Mercurial > hg > match-vamp
diff src/Matcher.cpp @ 135:42381e437fcd refactors
The finder is supposed to use normalised path-cost when calculation expand direction (as in Java implementation). Also, provide a way to query the forward path.
author | Chris Cannam |
---|---|
date | Thu, 18 Dec 2014 17:56:54 +0000 |
parents | 6636aca831c0 |
children | cfba9aec7569 |
line wrap: on
line diff
--- a/src/Matcher.cpp Thu Dec 11 15:16:15 2014 +0000 +++ b/src/Matcher.cpp Thu Dec 18 17:56:54 2014 +0000 @@ -154,6 +154,13 @@ } double +Matcher::getNormalisedPathCost(int i, int j) +{ + // normalised for path length. 1+ prevents division by zero here + return getPathCost(i, j) / (1 + i + j); +} + +double Matcher::getPathCost(int i, int j) { if (m_firstPM) {