CRP.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 CRP_H
16 #define CRP_H
17 
18 #include "Types.h"
19 #include "DCTReduce.h"
20 
29 class CRP
30 {
31 public:
32  struct Parameters {
33  int coefficientsToDrop;
34  bool applyLogCompression;
35  double logFactor;
36  double logAddTerm;
37  int normP; // 0 = no normalisation, 1 = L^1, 2 = L^2
38  double normThresh;
39  Parameters() :
40  coefficientsToDrop(55),
41  applyLogCompression(true),
42  logFactor(1000.0),
43  logAddTerm(1.0),
44  normP(2),
45  normThresh(1e-6)
46  { }
47  };
48 
49  CRP(Parameters params);
50  ~CRP();
51 
55  RealBlock process(const RealBlock &in);
56 
60  RealColumn process(RealColumn col);
61 
62 private:
63  Parameters m_params;
64  DCTReduce m_dctReduce;
65 };
66 
67 #endif
68 
Definition: DCTReduce.h:22
RealBlock process(const RealBlock &in)
Definition: CRP.cpp:36
Definition: CRP.h:32
Definition: CRP.h:29