Remove samples less than the specified threshold. */
| 8 | |
| 9 | /** Remove samples less than the specified threshold. */ |
| 10 | Histogram Histogram::trimLow(T threshold) const |
| 11 | { |
| 12 | Histogram h; |
| 13 | for (Histogram::Map::const_iterator it = m_map.begin(); |
| 14 | it != m_map.end(); it++) |
| 15 | if (it->first >= threshold) |
| 16 | h.insert(it->first, it->second); |
| 17 | return h; |
| 18 | } |
| 19 | |
| 20 | /** Trim off the bottom fraction/2 and top fraction/2 data points. |
| 21 | * At least (1 - fraction) of the data will remain. |
no test coverage detected