[Gridflow-cvs] [svn] commit: r5705 - in /trunk/doc/flow_classes: #grade-help.pd #sort-help.pd

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Wed Jun 23 18:36:55 EDT 2010


Author: matju
Date: Wed Jun 23 18:36:54 2010
New Revision: 5705

Log:
I hope that this is clearer and better organised

Modified:
    trunk/doc/flow_classes/#grade-help.pd
    trunk/doc/flow_classes/#sort-help.pd

Modified: trunk/doc/flow_classes/#grade-help.pd
==============================================================================
--- trunk/doc/flow_classes/#grade-help.pd (original)
+++ trunk/doc/flow_classes/#grade-help.pd Wed Jun 23 18:36:54 2010
@@ -1,45 +1,52 @@
-#N canvas 690 0 632 680 10;
-#X text 143 55 splits a dim[a... \, b] grid into dim[b] vectors that
-each contain numbers from 0 to b-1 indicating the ordering of the values.
-the result is a dim[a... \, b] grid.;
-#X floatatom 19 114 5 0 0 0 - - -;
-#X floatatom 60 114 5 0 0 0 - - -;
-#X floatatom 101 114 5 0 0 0 - - -;
-#X floatatom 142 114 5 0 0 0 - - -;
-#X obj 19 146 #pack 4;
-#X obj 19 179 #grade;
-#X obj 19 208 #print;
+#N canvas 596 0 632 610 10;
+#X floatatom 19 54 5 0 0 0 - - -;
+#X floatatom 51 54 5 0 0 0 - - -;
+#X floatatom 83 54 5 0 0 0 - - -;
+#X floatatom 115 54 5 0 0 0 - - -;
+#X obj 19 86 #pack 4;
+#X obj 19 105 #grade;
 #X obj 0 0 doc_h;
-#X obj 3 250 doc_c 0;
-#X obj 3 290 doc_i 1;
-#X obj 3 350 doc_o 1;
-#X obj 14 380 doc_oo 0;
-#X obj 14 320 doc_ii 0;
-#X obj 97 320 doc_m i0 grid;
-#X obj 97 380 doc_m o0 grid;
-#X text 232 380 splits a Dim[A... \, B] grid into Dim[B] vectors \,
-producing new Dim[B] vectors that each contain numbers from 0 to B-1
-indicating the ordering of the values. The result is a Dim[A... \,
-B] grid.;
-#X text 232 441 for example \, connecting a [#grade] to a [#outer ignore
-0] to a [#store] object \, storing a single vector into [#store] \,
-and sending the same vector to [#grade] \, will sort the values of
-the vector. however for higher-dimensional grids \, what should go
-between [#store] and [#grade] to achieve the same result would be more
-complex.;
-#X text 232 541 you may achieve different kinds of sorting by applying
+#X obj 3 157 doc_c 0;
+#X obj 3 197 doc_i 1;
+#X obj 3 446 doc_o 1;
+#X obj 14 476 doc_oo 0;
+#X obj 14 227 doc_ii 0;
+#X obj 97 227 doc_m i0 grid;
+#X obj 97 476 doc_m o0 grid;
+#X text 232 336 you may achieve different kinds of sorting by applying
 various filters before [#grade]. the possibilities are unlimited. if
 you plug [#grade] directly into another [#grade] \, you will get the
 inverse arrangement \, which allows to take the sorted values and make
 them unsorted in the original way. note that this is really not the
 same as just listing the values backwards.;
-#X obj 0 651 doc_f;
-#X connect 1 0 5 0;
-#X connect 2 0 5 1;
-#X connect 3 0 5 2;
-#X connect 4 0 5 3;
-#X connect 5 0 6 0;
-#X connect 6 0 7 0;
-#X connect 15 1 16 0;
-#X connect 15 1 17 0;
-#X connect 15 1 18 0;
+#X obj 0 576 doc_f;
+#X obj 3 556 doc_also;
+#X obj 103 556 #sort;
+#X text 232 288 For a grid of size (m... n) \, each piece of size (n)
+is considered separately \, making many separate gradings \, and everything
+is put together in a grid of size (m... n).;
+#X obj 19 124 display;
+#X text 236 58 indicates how values have to be placed in order to be
+sorted. can be used for sorting \, but also other activities related
+to sorting \, such as finding the biggest element \, finding the median
+\, equalising colours \, etc.;
+#X text 232 227 For a grid of size (n) \, gives a "top" of elements
+\, from smallest to largest. This is a crucial component for making
+[#sort] (look at the inside of a [#sort] object for an example).;
+#X text 232 498 Values produced are ranging from 0 to n-1 \, because
+that's the normal numbering of grid elements in GridFlow \, and is
+what [#store] expects.;
+#X text 232 476 Grid of the same size as input \, but in numbertype
+"i".;
+#X connect 0 0 4 0;
+#X connect 1 0 4 1;
+#X connect 2 0 4 2;
+#X connect 3 0 4 3;
+#X connect 4 0 5 0;
+#X connect 5 0 19 0;
+#X connect 12 1 21 0;
+#X connect 12 1 18 0;
+#X connect 12 1 14 0;
+#X connect 13 1 23 0;
+#X connect 13 1 22 0;
+#X connect 16 1 17 0;

Modified: trunk/doc/flow_classes/#sort-help.pd
==============================================================================
--- trunk/doc/flow_classes/#sort-help.pd (original)
+++ trunk/doc/flow_classes/#sort-help.pd Wed Jun 23 18:36:54 2010
@@ -1,4 +1,4 @@
-#N canvas 484 136 632 572 10;
+#N canvas 484 76 632 642 10;
 #X obj 28 250 #sort;
 #X msg 28 45 0 1 1 2 3 5 8 13 21 34 55 89;
 #X msg 28 102 12 # 666;
@@ -9,26 +9,38 @@
 #X obj 28 83 #finished;
 #X obj 58 204 display;
 #X obj 28 159 #outer + (0);
-#X text 151 140 shuffle;
 #X obj 58 274 display;
-#X text 140 252 unshuffle;
 #X obj 0 0 doc_h;
 #X obj 3 311 doc_c 0;
 #X obj 3 351 doc_i 1;
-#X obj 3 461 doc_o 1;
-#X obj 3 523 doc_also;
-#X obj 103 523 #grade;
-#X obj 14 491 doc_oo 0;
+#X obj 3 535 doc_o 1;
+#X obj 3 597 doc_also;
+#X obj 103 597 #grade;
+#X obj 14 565 doc_oo 0;
 #X obj 14 381 doc_ii 0;
-#X obj 0 543 doc_f;
+#X obj 0 617 doc_f;
 #X obj 97 381 doc_m i0 grid;
-#X obj 97 491 doc_m o0 grid;
-#X text 232 491 sorted data;
-#X text 232 381 1-D grid to be sorted;
-#X text 232 403 this takes an average time proportional to N log N
-(a pass on the data takes N time \, and sorting something twice bigger
-takes an extra pass);
-#X connect 0 0 11 0;
+#X obj 97 565 doc_m o0 grid;
+#X obj 3 597 doc_also;
+#X text 113 132 shuffle : grading a bunch of uniformly distributed
+random numbers is a good way to produce a quite uniformly distributed
+random permutation (a fair shuffling).;
+#X text 72 177 [#store] applies the shuffling to the list at the top
+;
+#X text 69 241 unshuffle... this also uses [#grade] [#outer] [#store]
+internally... have a look;
+#X text 232 381 grid of size (n) to be sorted;
+#X text 232 403 this takes an average time proportional to n*log(n)
+(a pass on the data takes n time \, and sorting something with a twice
+bigger n takes an extra pass \, thus the log(n)... in base two);
+#X obj 3 597 doc_also;
+#X text 232 464 this does not support sorting grids in more dimensions
+: then you have to decide a policy for how the sorting to happen. If
+you have a suggestion about what [#sort] should do with multidimensional
+grids \, contact the author.;
+#X text 232 565 sorted data \, of same size and type as the input.
+;
+#X connect 0 0 10 0;
 #X connect 1 0 6 0;
 #X connect 2 0 3 0;
 #X connect 3 0 5 0;
@@ -39,7 +51,8 @@
 #X connect 6 1 4 1;
 #X connect 7 0 2 0;
 #X connect 9 0 4 0;
-#X connect 17 1 18 0;
-#X connect 22 1 25 0;
-#X connect 22 1 26 0;
-#X connect 23 1 24 0;
+#X connect 15 1 16 0;
+#X connect 20 1 26 0;
+#X connect 20 1 27 0;
+#X connect 20 1 29 0;
+#X connect 21 1 30 0;



More information about the Gridflow-cvs mailing list