aboutsummaryrefslogtreecommitdiff
path: root/help/tabsort-help.pd
blob: 805f12ab5336f32bcb7453cac7504011a5da80ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#N canvas 118 208 534 360 10;
#X text 22 332 (c) Antoine Rousseau 2001;
#X floatatom 39 303 5 0 0 0 - - -;
#X obj 21 19 tabsort;
#X text 20 58 args: source_table dest_table;
#N canvas 0 0 450 300 graph29 0;
#X array source 10 float 1;
#A 0 -0.0571429 -0.985715 -0.942858 -0.857143 -0.757143 -0.542857 -0.171429
0.528571 0.842858 0.914287;
#X coords 0 1 9 -1 200 140 1;
#X restore 51 92 graph;
#N canvas 0 0 450 300 graph29 0;
#X array dest 10 float 1;
#A 0 9 8 7 0 6 5 4 3 2 1;
#X coords 0 10 9 0 200 140 1;
#X restore 304 89 graph;
#X obj 39 282 tabsort source dest;
#X msg 39 262 10;
#X text 79 12 write to dest_table the indices of source_table's elements
sorted by decreasing order (biggest first);
#X text 38 248 sort the n first elements;
#X obj 304 264 tabread dest;
#X obj 304 285 tabread source;
#X floatatom 304 246 5 0 0 0 - - -;
#X floatatom 304 305 5 0 0 0 - - -;
#X text 347 244 try it!;
#X text 300 321 it should decrease with input;
#X connect 6 0 1 0;
#X connect 7 0 6 0;
#X connect 10 0 11 0;
#X connect 11 0 13 0;
#X connect 12 0 10 0;