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