comparison maths/MathUtilities.h @ 280:9c403afdd9e9

* Various fixes related to the bar estimator code
author Chris Cannam <c.cannam@qmul.ac.uk>
date Tue, 10 Feb 2009 16:37:11 +0000
parents c8908cdc8c32
children 702ff8c08137
comparison
equal deleted inserted replaced
279:c8908cdc8c32 280:9c403afdd9e9
50 static void normalise(std::vector<double> &data, 50 static void normalise(std::vector<double> &data,
51 NormaliseType n = NormaliseUnitMax); 51 NormaliseType n = NormaliseUnitMax);
52 52
53 // moving mean threshholding: 53 // moving mean threshholding:
54 static void adaptiveThreshold(std::vector<double> &data); 54 static void adaptiveThreshold(std::vector<double> &data);
55
56 static bool isPowerOfTwo(int x);
57 static int nextPowerOfTwo(int x); // e.g. 1300 -> 2048, 2048 -> 2048
58 static int previousPowerOfTwo(int x); // e.g. 1300 -> 1024, 2048 -> 2048
59 static int nearestPowerOfTwo(int x); // e.g. 1300 -> 1024, 1700 -> 2048
55 }; 60 };
56 61
57 #endif 62 #endif