Mercurial > hg > qm-dsp
comparison maths/MathUtilities.h @ 55:7fe29d8a7eaf
* Various fixes related to the bar estimator code
author | cannam |
---|---|
date | Tue, 10 Feb 2009 16:37:11 +0000 |
parents | 5bec06ecc88a |
children | 054c384d860d |
comparison
equal
deleted
inserted
replaced
54:5bec06ecc88a | 55:7fe29d8a7eaf |
---|---|
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 |