Mercurial > hg > tipic
annotate src/CENS.h @ 60:1ea2aed23d4a tip
Fix version
author | Chris Cannam |
---|---|
date | Thu, 13 Feb 2020 13:37:36 +0000 |
parents | 00b6ae41efbe |
children |
rev | line source |
---|---|
Chris@39 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@39 | 2 |
Chris@42 | 3 /* |
Chris@42 | 4 Tipic |
Chris@42 | 5 |
Chris@42 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@42 | 7 |
Chris@42 | 8 This program is free software; you can redistribute it and/or |
Chris@42 | 9 modify it under the terms of the GNU General Public License as |
Chris@42 | 10 published by the Free Software Foundation; either version 2 of the |
Chris@42 | 11 License, or (at your option) any later version. See the file |
Chris@42 | 12 COPYING included with this distribution for more information. |
Chris@42 | 13 */ |
Chris@42 | 14 |
Chris@39 | 15 #ifndef CENS_H |
Chris@39 | 16 #define CENS_H |
Chris@39 | 17 |
Chris@39 | 18 #include "Types.h" |
Chris@39 | 19 #include "Quantize.h" |
Chris@39 | 20 |
Chris@39 | 21 class CENS |
Chris@39 | 22 { |
Chris@39 | 23 public: |
Chris@39 | 24 struct Parameters { |
Chris@39 | 25 public: |
Chris@39 | 26 std::vector<double> quantSteps; |
Chris@39 | 27 std::vector<double> quantWeights; |
Chris@39 | 28 int normP; // 0 = no normalisation, 1 = L^1, 2 = L^2 |
Chris@39 | 29 double normThresh; |
Chris@39 | 30 Parameters() : |
Chris@39 | 31 quantSteps({ 0.4, 0.2, 0.1, 0.05 }), |
Chris@39 | 32 quantWeights({ 0.25, 0.25, 0.25, 0.25 }), |
Chris@39 | 33 normP(1), |
Chris@39 | 34 normThresh(1e-3) |
Chris@39 | 35 { } |
Chris@39 | 36 }; |
Chris@39 | 37 |
Chris@39 | 38 CENS(Parameters params); |
Chris@39 | 39 ~CENS(); |
Chris@39 | 40 |
Chris@39 | 41 RealBlock process(const RealBlock &in); |
Chris@39 | 42 |
Chris@39 | 43 private: |
Chris@39 | 44 Parameters m_params; |
Chris@39 | 45 Quantize m_quantize; |
Chris@39 | 46 }; |
Chris@39 | 47 |
Chris@39 | 48 #endif |
Chris@39 | 49 |