I think the problelems are worked out.
NB. Random rank noun B
NB. and dom rank verb b ox
A=:'ABCDEFFGHIJKLMNOPSSTUVXYZ'
B=:(>:?(?4)#4)$A
D=:<"(C=:?>:#$B)B
(((<B);<D),:(<'noun rank'),<'verb rank'),(#$B);<C
┌─────────┬─────────────────────┐
│┌────┐ │┌────┬────┬────┬────┐│
││ABCD│ ││ABCD│EFFG│HIJK│LMNO││
││EFFG│ │├────┼────┼────┼────┤│
││HIJK│ ││PSST│UVXY│ZABC│DEFF││
││LMNO│ │├────┼────┼────┼────┤│
││ │ ││GHIJ│KLMN│OPSS│TUVX││
││PSST│ │└────┴────┴────┴────┘│
││UVXY│ │ │
││ZABC│ │ │
││DEFF│ │ │
││ │ │ │
││GHIJ│ │ │
││KLMN│ │ │
││OPSS│ │ │
││TUVX│ │ │
│└────┘ │ │
├─────────┼─────────────────────┤
│noun rank│verb rank │
├─────────┼─────────────────────┤
│3 │1 │
└─────────┴─────────────────────┘
$B
3 4 4
Here's anotherer result.
┌─────────┬─────────┐
│┌───┐ │┌─┬─┬─┐ │
││ABC│ ││A│B│C│ │
││DEF│ │├─┼─┼─┤ │
││FGH│ ││D│E│F│ │
│└───┘ │├─┼─┼─┤ │
│ ││F│G│H│ │
│ │└─┴─┴─┘ │
├─────────┼─────────┤
│noun rank│verb rank│
├─────────┼─────────┤
│2 │0 │
└─────────┴─────────┘
$B
3 3
Linda
-----Original Message-----
From: Programming <[email protected]> On Behalf Of Linda
Alvord
Sent: Sunday, September 23, 2018 8:43 PM
To: [email protected]
Subject: Re: [Jprogramming] Using rank to avoid looping - reference?
Why not include these?
#$F=:' '
0
#$G=:'A'
0
<"0 F
┌─┐
│ │
└─┘
<"0 G
┌─┐
│A│
└─┘
Maybe A=:' ABC...
But that might be messy.
Linda
Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------
From: David Lambert <[email protected]>
Date: 9/23/18 7:55 PM (GMT-05:00)
To: programming <[email protected]>
Subject: Re: [Jprogramming] Using rank to avoid looping - reference?
err, yes and
rank =: # @: $
DATA =: 'ABCDEFFGHIJKLMNOPSSTUVXYZ'
SHAPE =: >: ? 3 # 5 NB. zeros aren't beneficial to this demonstration
A =: SHAPE $ DATA NB. A is a rank 3 array of random shape
ITEM_RANK =: ? >: rank A
(;:'array items') , ( (< A) ; ( < <"ITEM_RANK A) ) , ( SHAPE ; ITEM_RANK )
On 09/23/2018 07:19 PM, David Lambert wrote:
>
> DATA =: 'ABCDEFFGHIJKLMNOPSSTUVXYZ'
> SHAPE =: >: ? 3 # 5 NB. zeros aren't beneficial to this demonstration
> A =: SHAPE $ DATA NB. A is a rank 3 array of random shape
> ITEM_RANK =: ? >: rank A
> (;:'array items') , ( (< A) ; ( < <"ITEM_RANK A) ) , ( SHAPE ; ITEM_RANK )
>
>
----------------------------------------------------------------------
For information about J forums see
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C1266de0713734fedfd6408d621b6ac63%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636733465783806810&sdata=383Qdrf8YnpNenw49nKMAH7UDHgeWickimTflh8udrc%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C1266de0713734fedfd6408d621b6ac63%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636733465783806810&sdata=383Qdrf8YnpNenw49nKMAH7UDHgeWickimTflh8udrc%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm