comparison maths/MathUtilities.h @ 16:2e3f5d2d62c1

* Move dsp/maths to maths ; bring PCA and HMM across from Soundbite
author cannam
date Wed, 09 Jan 2008 10:31:29 +0000
parents dsp/maths/MathUtilities.h@85a9e268a8c4
children ad645e404d0c
comparison
equal deleted inserted replaced
15:10c3f9df4a07 16:2e3f5d2d62c1
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 QM DSP Library
5
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2005-2006 Christian Landone.
8 All rights reserved.
9 */
10
11 #ifndef MATHUTILITIES_H
12 #define MATHUTILITIES_H
13
14 #include <vector>
15
16 class MathUtilities
17 {
18 public:
19 static double round( double x );
20 static void getFrameMinMax( const double* data, unsigned int len, double* min, double* max );
21 static double mean( const double* src, unsigned int len );
22 static double sum( const double* src, unsigned int len );
23 static double princarg( double ang );
24 static double median( const double* src, unsigned int len );
25 static double mod( double x, double y);
26 static void getAlphaNorm(const double *data, unsigned int len, unsigned int alpha, double* ANorm);
27 static double getAlphaNorm(const std::vector <double> &data, unsigned int alpha );
28 static void circShift( double* data, int length, int shift);
29 static int getMax( double* data, unsigned int length, double* max );
30 static int compareInt(const void * a, const void * b);
31 };
32
33 #endif