I should have pointed out:
($ #: I.@,)
is not as good as
((0 (0}) $) #: I.@,)
for finding 2-d indices. ((r,c) #: y) divides by r and c, whereas
((0,c) #: y) divides only by c.
Henry Rich
On 10/30/2021 1:21 AM, Elijah Stone wrote:
Ah, I see. (Assuming you meant i.@# rather than i.@$.)
I definitely struggle to see a use case. Such a verb would only be
meaningful for arrays whose first and last axes were the same length.
-E
On Sat, 30 Oct 2021, Henry Rich wrote:
Oh. My feeling is, if ($ #: I.@,) does what you need, the definition
of I. is OK. However you define it, I. will need some surrounding
verbs sometimes.
I am looking for a case where (# i.@$) is needed at rank greater than 1.
Henry Rich
On 10/30/2021 12:27 AM, Elijah Stone wrote:
]x=. 1 5 6 7 e.~ i.3 3
0 1 0
0 0 1
1 1 0
That is, an edge from node 0 to node 1; from 1 to 2; from 2 to 0;
and from 2 to 1.
($#:I.@,) x
0 1
1 2
2 0
2 1
-E
On Sat, 30 Oct 2021, Henry Rich wrote:
Sorry, I don't see it. Can you give an example?
Henry Rich
On 10/29/2021 11:54 PM, Elijah Stone wrote:
On Wed, 27 Oct 2021, Henry Rich wrote:
Isn't I. defined as (# i.@#)"1? If you want a different rank you
could specify one. But can you give an example where you would
do that?
The high-rank algorithm, applied to an adjacency matrix, gives a
list of edges.
-E
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm