Mercurial > hg > match-vamp
comparison src/DistanceMetric.cpp @ 140:cfba9aec7569 refactors
Separate out the raw & conditioned feature outputs (previously only conditioned was available, but we want raw for our tests). Plus some optional debug output
author | Chris Cannam |
---|---|
date | Thu, 08 Jan 2015 12:11:27 +0000 |
parents | af69db43f5a4 |
children | 7f6f150c1edf 6914a6a01ffc |
comparison
equal
deleted
inserted
replaced
139:b62dbe2ba958 | 140:cfba9aec7569 |
---|---|
19 #include <cassert> | 19 #include <cassert> |
20 #include <cmath> | 20 #include <cmath> |
21 #include <iostream> | 21 #include <iostream> |
22 | 22 |
23 using namespace std; | 23 using namespace std; |
24 | |
25 //#define DEBUG_DISTANCE_METRIC 1 | |
26 | |
27 DistanceMetric::DistanceMetric(DistanceNormalisation norm) : | |
28 m_norm(norm) | |
29 { | |
30 #ifdef DEBUG_DISTANCE_METRIC | |
31 cerr << "*** DistanceMetric: norm = " << m_norm << endl; | |
32 #endif | |
33 } | |
24 | 34 |
25 double | 35 double |
26 DistanceMetric::calcDistance(const vector<double> &f1, | 36 DistanceMetric::calcDistance(const vector<double> &f1, |
27 const vector<double> &f2) | 37 const vector<double> &f2) |
28 { | 38 { |