Chris@39: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@39: Chris@42: /* Chris@42: Tipic Chris@42: Chris@42: Centre for Digital Music, Queen Mary, University of London. Chris@42: Chris@42: This program is free software; you can redistribute it and/or Chris@42: modify it under the terms of the GNU General Public License as Chris@42: published by the Free Software Foundation; either version 2 of the Chris@42: License, or (at your option) any later version. See the file Chris@42: COPYING included with this distribution for more information. Chris@42: */ Chris@42: Chris@39: #ifndef CENS_H Chris@39: #define CENS_H Chris@39: Chris@39: #include "Types.h" Chris@39: #include "Quantize.h" Chris@39: Chris@39: class CENS Chris@39: { Chris@39: public: Chris@39: struct Parameters { Chris@39: public: Chris@39: std::vector quantSteps; Chris@39: std::vector quantWeights; Chris@39: int normP; // 0 = no normalisation, 1 = L^1, 2 = L^2 Chris@39: double normThresh; Chris@39: Parameters() : Chris@39: quantSteps({ 0.4, 0.2, 0.1, 0.05 }), Chris@39: quantWeights({ 0.25, 0.25, 0.25, 0.25 }), Chris@39: normP(1), Chris@39: normThresh(1e-3) Chris@39: { } Chris@39: }; Chris@39: Chris@39: CENS(Parameters params); Chris@39: ~CENS(); Chris@39: Chris@39: RealBlock process(const RealBlock &in); Chris@39: Chris@39: private: Chris@39: Parameters m_params; Chris@39: Quantize m_quantize; Chris@39: }; Chris@39: Chris@39: #endif Chris@39: