Lines Matching +full:2 +full:nd
12 * The algorithm keeps track of the best, 2nd best & 3rd best min
22 * every new min and overwrites 2nd & 3rd choices. The same property
23 * holds for 2nd & 3rd best.
28 /* As time advances, update the 1st, 2nd, and 3rd choices. */
36 * Passed entire window without a new val so make 2nd in minmax_subwin_update()
37 * choice the new val & 3rd choice the new 2nd choice. in minmax_subwin_update()
38 * we may have to iterate this since our 2nd choice in minmax_subwin_update()
43 m->s[1] = m->s[2]; in minmax_subwin_update()
44 m->s[2] = *val; in minmax_subwin_update()
47 m->s[1] = m->s[2]; in minmax_subwin_update()
48 m->s[2] = *val; in minmax_subwin_update()
53 * so take a 2nd choice from the 2nd quarter of the window. in minmax_subwin_update()
55 m->s[2] = m->s[1] = *val; in minmax_subwin_update()
56 } else if (unlikely(m->s[2].t == m->s[1].t) && dt > win/2) { in minmax_subwin_update()
61 m->s[2] = *val; in minmax_subwin_update()
66 /* Check if new measurement updates the 1st, 2nd or 3rd choice max. */
72 unlikely(val.t - m->s[2].t > win)) /* nothing left in window? */ in minmax_running_max()
76 m->s[2] = m->s[1] = val; in minmax_running_max()
77 else if (unlikely(val.v >= m->s[2].v)) in minmax_running_max()
78 m->s[2] = val; in minmax_running_max()
84 /* Check if new measurement updates the 1st, 2nd or 3rd choice min. */
90 unlikely(val.t - m->s[2].t > win)) /* nothing left in window? */ in minmax_running_min()
94 m->s[2] = m->s[1] = val; in minmax_running_min()
95 else if (unlikely(val.v <= m->s[2].v)) in minmax_running_min()
96 m->s[2] = val; in minmax_running_min()