projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
update qm-dsp library
[ardour.git]
/
libs
/
qm-dsp
/
maths
/
KLDivergence.cpp
diff --git
a/libs/qm-dsp/maths/KLDivergence.cpp
b/libs/qm-dsp/maths/KLDivergence.cpp
index 3502afb5ccaf0985817afb6e6538fcaaba914079..3c3cb134ca02505dd0a987f23e42b38ef8c3294e 100644
(file)
--- a/
libs/qm-dsp/maths/KLDivergence.cpp
+++ b/
libs/qm-dsp/maths/KLDivergence.cpp
@@
-50,7
+50,7
@@
double KLDivergence::distanceDistribution(const vector<double> &d1,
double d = 0;
double small = 1e-20;
-
+
for (int i = 0; i < sz; ++i) {
d += d1[i] * log10((d1[i] + small) / (d2[i] + small));
}