annotate maths/CosineDistance.h @ 276:4c901426b9f3

* Do not calculate CQ sparse kernel when chromagram is constructed: only when it's actually used * Pre-calculate CQ sparse kernels in the sizes required for the default configurations of some of our transforms
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 04 Dec 2008 11:59:29 +0000
parents 43943a4382ef
children e5907ae6de17
rev   line source
c@256 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
c@256 2
c@256 3 /*
c@256 4 QM DSP Library
c@256 5
c@256 6 Centre for Digital Music, Queen Mary, University of London.
c@256 7 This file copyright 2008 Kurt Jacobson.
c@256 8 All rights reserved.
c@256 9 */
c@256 10
c@256 11 #ifndef COSINEDISTANCE_H
c@256 12 #define COSINEDISTANCE_H
c@256 13
c@256 14 #include <vector>
c@256 15 #include <math.h>
c@256 16
c@256 17 using std::vector;
c@256 18
c@256 19 class CosineDistance
c@256 20 {
c@256 21 public:
c@256 22 CosineDistance() { }
c@256 23 ~CosineDistance() { }
c@256 24
c@256 25 double distance(const vector<double> &v1, const vector<double> &v2);
c@256 26
c@256 27 protected:
c@256 28 double dist, dDenTot, dDen1, dDen2, dSum1;
c@256 29 };
c@256 30
c@256 31 #endif
c@256 32