1 IN: splitting.monotonic
2 USING: tools.test math arrays kernel sequences ;
4 [ { { 1 } { -1 5 } { 2 4 } } ]
5 [ { 1 -1 5 2 4 } [ < ] monotonic-split [ >array ] map ] unit-test
6 [ { { 1 1 1 1 } { 2 2 } { 3 } { 4 } { 5 } { 6 6 6 } } ]
7 [ { 1 1 1 1 2 2 3 4 5 6 6 6 } [ = ] monotonic-split [ >array ] map ] unit-test
10 [ { } [ = ] slice monotonic-slice ] unit-test
13 [ { 1 } [ = ] slice monotonic-slice [ slice? ] all? ] unit-test
16 [ { 1 } [ = ] slice monotonic-slice [ >array ] map ] unit-test
18 [ { 1 } [ = ] slice monotonic-slice ] must-infer
21 [ { 1 1 1 2 2 3 3 4 } [ = ] slice monotonic-slice [ slice? ] all? ] unit-test
23 [ { { 1 1 1 } { 2 2 } { 3 3 } { 4 } } ]
24 [ { 1 1 1 2 2 3 3 4 } [ = ] slice monotonic-slice [ >array ] map ] unit-test
27 [ { 3 3 } [ = ] slice monotonic-slice [ >array ] map ] unit-test
31 T{ upward-slice { from 0 } { to 3 } { seq { 1 2 3 2 1 } } }
32 T{ downward-slice { from 2 } { to 5 } { seq { 1 2 3 2 1 } } }
35 [ { 1 2 3 2 1 } trends ] unit-test
42 { seq { 1 2 3 3 2 1 } }
47 { seq { 1 2 3 3 2 1 } }
52 { seq { 1 2 3 3 2 1 } }
55 ] [ { 1 2 3 3 2 1 } trends ] unit-test