Mercurial > hg > svcore
comparison base/LogRange.cpp @ 1392:667e369cfeab
LogRange tests
author | Chris Cannam |
---|---|
date | Tue, 28 Feb 2017 11:21:49 +0000 |
parents | b061b9f8fca5 |
children | 04abe8f73b22 |
comparison
equal
deleted
inserted
replaced
1391:2c0e04062a99 | 1392:667e369cfeab |
---|---|
94 variance = variance / n; | 94 variance = variance / n; |
95 return sqrt(variance); | 95 return sqrt(variance); |
96 } | 96 } |
97 | 97 |
98 bool | 98 bool |
99 LogRange::useLogScale(std::vector<double> values) | 99 LogRange::shouldUseLogScale(std::vector<double> values) |
100 { | 100 { |
101 // Principle: Partition the data into two sets around the median; | 101 // Principle: Partition the data into two sets around the median; |
102 // calculate the standard deviation of each set; if the two SDs | 102 // calculate the standard deviation of each set; if the two SDs |
103 // are very different, it's likely that a log scale would be good. | 103 // are very different, it's likely that a log scale would be good. |
104 | 104 |