((#~>:@|.)i.4)</."1 r +-------+-----+---+-+ |9 8 6 1|2 2 2|6 8|7| +-------+-----+---+-+ |5 4 8 4|2 7 9|1 4|1| +-------+-----+---+-+ |4 3 3 7|7 0 6|7 6|6| +-------+-----+---+-+
R.E. Boss > -----Oorspronkelijk bericht----- > Van: Programming <[email protected]> > Namens Skip Cave > Verzonden: dinsdag 7 april 2020 19:33 > Aan: [email protected] > Onderwerp: [Jprogramming] Partitioning > > Given an array of random integers: > > r > > 9 8 6 1 2 2 2 6 8 7 > > 5 4 8 4 2 7 9 1 4 1 > > 4 3 3 7 7 0 6 7 6 6 > > > And a partitioning template: > > ]m=.0 1 2 3;4 5 6;7 8;9 > > ┌───────┬─────┬───┬─┐ > > │0 1 2 3│4 5 6│7 8│9│ > > └───────┴─────┴───┴─┘ > > > How to produce the following partitions of r? > > m par r > > ┌───────┬─────┬───┬─┐ > > │9 8 6 1│2 2 2│6 8│7│ > > ├───────┼─────┼───┼─┤ > > │5 4 8 4│2 7 9│1 4│1│ > > ├───────┼─────┼───┼─┤ > > │4 3 3 7│7 0 6│7 6│6│ > > └───────┴─────┴───┴─┘ > > How do you define the dyadic par verb in m par r? > > Skip Cave > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
