annotate maths/CosineDistance.h @ 515:08bcc06c38ec tip master

Remove fast-math
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 28 Jan 2020 15:27:37 +0000
parents bb78ca3fe7de
children
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 QM DSP Library
c@256 4
c@256 5 Centre for Digital Music, Queen Mary, University of London.
c@256 6 This file copyright 2008 Kurt Jacobson.
c@309 7
c@309 8 This program is free software; you can redistribute it and/or
c@309 9 modify it under the terms of the GNU General Public License as
c@309 10 published by the Free Software Foundation; either version 2 of the
c@309 11 License, or (at your option) any later version. See the file
c@309 12 COPYING included with this distribution for more information.
c@256 13 */
c@256 14
cannam@489 15 #ifndef QM_DSP_COSINEDISTANCE_H
cannam@489 16 #define QM_DSP_COSINEDISTANCE_H
c@256 17
c@256 18 #include <vector>
c@256 19 #include <math.h>
c@256 20
c@256 21 class CosineDistance
c@256 22 {
c@256 23 public:
c@256 24 CosineDistance() { }
c@256 25 ~CosineDistance() { }
c@256 26
cannam@493 27 double distance(const std::vector<double> &v1,
cannam@493 28 const std::vector<double> &v2);
c@256 29
c@256 30 protected:
c@256 31 double dist, dDenTot, dDen1, dDen2, dSum1;
c@256 32 };
c@256 33
c@256 34 #endif
c@256 35