cannam@31: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ cannam@31: cannam@31: /* cannam@31: QM DSP Library cannam@31: cannam@31: Centre for Digital Music, Queen Mary, University of London. cannam@31: This file copyright 2008 Kurt Jacobson. Chris@84: Chris@84: This program is free software; you can redistribute it and/or Chris@84: modify it under the terms of the GNU General Public License as Chris@84: published by the Free Software Foundation; either version 2 of the Chris@84: License, or (at your option) any later version. See the file Chris@84: COPYING included with this distribution for more information. cannam@31: */ cannam@31: cannam@31: #ifndef COSINEDISTANCE_H cannam@31: #define COSINEDISTANCE_H cannam@31: cannam@31: #include cannam@31: #include cannam@31: cannam@31: using std::vector; cannam@31: cannam@31: class CosineDistance cannam@31: { cannam@31: public: cannam@31: CosineDistance() { } cannam@31: ~CosineDistance() { } cannam@31: cannam@31: double distance(const vector &v1, const vector &v2); cannam@31: cannam@31: protected: cannam@31: double dist, dDenTot, dDen1, dDen2, dSum1; cannam@31: }; cannam@31: cannam@31: #endif cannam@31: