trends ( seq -- slices )
Splitting trending sequences

Prev:upward-slices ( seq -- slices )


Vocabulary
splitting.monotonic

Inputs
seqa sequence


Outputs
slicesa sequence of downward, stable, and upward slices


Word description
Returns a sorted sequence of downward, stable, or upward slices. The endpoints of some slices may overlap with each other.

Examples
USING: splitting.monotonic math prettyprint ; { 1 2 3 3 2 1 } trends .
{ T{ upward-slice { to 3 } { seq { 1 2 3 3 2 1 } } } T{ stable-slice { from 2 } { to 4 } { seq { 1 2 3 3 2 1 } } } T{ downward-slice { from 3 } { to 6 } { seq { 1 2 3 3 2 1 } } } }


Definition