6{. <@(*|.)\|.i.10
+--+-----+--------+-----------+--------------+-----------------+
|81|72 72|63 64 63|54 56 56 54|45 48 49 48 45|36 40 42 42 40 36|
+--+-----+--------+-----------+--------------+-----------------+
R.E. Boss
-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Steven Taylor
Verzonden: dinsdag 21 oktober 2008 12:19
Aan: [email protected]
Onderwerp: [Jprogramming] How to Infix scan two arrays,and let one be
reversed mid-operation?
Hi,
I'm new to J. I like what I see so far.
Here is simplified version of the problem I'm trying to solve.
N =: i.10
M =: |. i.10
< \ (|. N) * M
│81│81 64│81 64 49│81 64 49 36│...│81 64 49 36 25 16 9 4 1 0│
But what I want is actually the reverse of the cumulative window. Not the
reverse of the entire list N -- only the reverse of N after N is broken into
a segment.
The result I'm trying to get:
|9 * 9|9 * 8 8 * 9|9 * 7 8 * 8 7 * 9|9 * 6 8 * 7 7 * 8 6 * 9|... etc
Which is
|81|72 72|63 64 63|54 56 56 54|... etc
Thanks,
-Steven
P.S. Sorry about the duplicate email. I hit ctrl+enter in outlook when I
meant to do this in a different program.
Internal Virus Database is out-of-date.
Checked by AVG.
Version: 7.5.526 / Virus Database: 270.8.0/1722 - Release Date: 13/10/2008
07:50
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm