Obtain the minimum for each observation, then return a list of pairwise differences [as signed integers] between them.
(&self)
| 273 | // Obtain the minimum for each observation, then return a list of pairwise |
| 274 | // differences [as signed integers] between them. |
| 275 | pub fn local_min_pairwise_diff(&self) -> Vec<isize> { |
| 276 | let local_mins: Vec<usize> = self.local_min(); |
| 277 | let mut diffs = Vec::new(); |
| 278 | for (x, y) in local_mins.iter().tuple_windows() { |
| 279 | diffs.push((*y as isize) - (*x as isize)); |
| 280 | } |
| 281 | diffs |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | /// A set of related measurements taken with different PMC events, where |