Mercurial > hg > match-vamp
changeset 88:1f5291760ed9 refactors
Version which prints out matrix on error
author | Chris Cannam |
---|---|
date | Thu, 27 Nov 2014 12:57:59 +0000 |
parents | fca28ed15c6e |
children | 7785bb8a1be6 |
files | src/Finder.cpp |
diffstat | 1 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Finder.cpp Thu Nov 27 12:54:20 2014 +0000 +++ b/src/Finder.cpp Thu Nov 27 12:57:59 2014 +0000 @@ -291,6 +291,32 @@ << endl; cerr << "Note: diagonal weight = " << m_m->getDiagonalWeight() << endl; cerr << endl; + cerr << "Distance matrix to this point (flipped):" << endl; + for (int c = 0; c <= err.r; ++c) { + cerr << "\t" << c; + } + cerr << endl; + for (int r = 0; r <= err.c; ++r) { + cerr << r; + for (int c = 0; c <= err.r; ++c) { + cerr << "\t" << m_m->getDistance(c, r); + } + cerr << endl; + } + cerr << endl; + cerr << "Cost matrix to this point (flipped):" << endl; + for (int c = 0; c <= err.r; ++c) { + cerr << "\t" << c; + } + cerr << endl; + for (int r = 0; r <= err.c; ++r) { + cerr << r; + for (int c = 0; c <= err.r; ++c) { + cerr << "\t" << m_m->getPathCost(c, r); + } + cerr << endl; + } + cerr << endl; } #endif