Skip to main content

ordinal_pattern_3

Function ordinal_pattern_3 

Source
pub fn ordinal_pattern_3(a: f32, b: f32, c: f32) -> usize
Expand description

Classify the ordinal pattern of a triplet (a, b, c) into one of 6 indices.

Returns 0–5 encoding the rank-order permutation:

IndexOrderDescription
0a ≤ b ≤ cRising
1a ≤ c < bRise-then-fall
2c < a ≤ bFall-then-rise
3b < a ≤ cDip-then-climb
4b ≤ c < aDescent with mid-bounce
5c < b < aFalling

Ties are broken by index order (left ≤ right).