comparison base/LogRange.h @ 478:1405f4a2caf3

* Add use-log-scale estimator. Not quite right yet; the model doesn't actually have any data in it yet at the point where we want to make this decision * Update changelog
author Chris Cannam
date Tue, 11 Nov 2008 13:54:47 +0000
parents 2268963dabd1
children 06f13a3b9e9e
comparison
equal deleted inserted replaced
477:e0784311a103 478:1405f4a2caf3
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef _LOG_RANGE_H_ 16 #ifndef _LOG_RANGE_H_
17 #define _LOG_RANGE_H_ 17 #define _LOG_RANGE_H_
18
19 #include <vector>
18 20
19 class LogRange 21 class LogRange
20 { 22 {
21 public: 23 public:
22 /** 24 /**
37 /** 39 /**
38 * Map a value from the logarithmic range back again. This just 40 * Map a value from the logarithmic range back again. This just
39 * means taking the value'th power of ten. 41 * means taking the value'th power of ten.
40 */ 42 */
41 static float unmap(float value); 43 static float unmap(float value);
44
45 /**
46 * Estimate whether a set of values would be more properly shown
47 * using a logarithmic than a linear scale. This is only ever
48 * going to be a rough guess.
49 */
50 static bool useLogScale(std::vector<float> values);
51
42 }; 52 };
43 53
44 #endif 54 #endif