Remember,

x {:: y

unboxes the selected atom, if an atom is selected; so it's not a general replacement for

(<x) { y

Henry Rich

On 5/29/2014 9:45 AM, Alex Giannakopoulos wrote:
OK, sorry for the noise, just saw it tagged to the side of the main body of
the NewVoc page. (As the "map" verb)
I daresay, though, that something which most people think of as the most
widely used functionality in array programming could have a bit more
prominent pride of place.


On 29 May 2014 14:13, Alex Giannakopoulos <[email protected]> wrote:

Ah, that's cool Michael, so that
   {::
is a shorthand or special code or something for

   ] {~ [: < [
is it?
Handy... should be added to Voc/NewVoc


On 29 May 2014 13:38, Michael Dykman <[email protected]> wrote:

For the sake of completeness:

1 3  {::  i. 4 4
7
]  s=.> 1 3; 2 1
1 3
2 1

  s  {::  i. 4 4
7 9
On May 29, 2014 8:18 AM, "Alex Giannakopoulos" <[email protected]>
wrote:

Hm, nice that, especially the intersection feature

   (<2 1;1 3) { i. 4 4   NB. Select rows 2&1, columns 1&3
9 11
5  7

Maybe it's time that NewVoc was linked to the Help page in place of Voc.

Certainly would have saved me a lot of time on more than one occasion.

Will certainly be checking that first from now on...






On 29 May 2014 12:09, Henry Rich <[email protected]> wrote:

It's in NuVoc:

http://www.jsoftware.com/jwiki/Vocabulary/curlylf#dyadic

Henry Rich


On 5/29/2014 6:44 AM, alexgian wrote:

Oops, scratch that, just saw it.


On 29 May 2014 11:39, alexgian <[email protected]> wrote:

  Thanking you kindly, sir, that's a relief!
Seems to work at all ranks, too.
I don't think it's in the Voc (under { ), or my eyesight is getting
really
bad.  Should be, IMHO, fairly crucial thing for an array-programming
language.



On 29 May 2014 11:23, Kip Murray <[email protected]> wrote:

      i. 4 4
   0  1  2  3
   4  5  6  7
   8  9 10 11
12 13 14 15
     (<2 1) { i. 4 4
9


On Thursday, May 29, 2014, alexgian <[email protected]>
wrote:

  If I want to index into a (rank 2) array to get the element
usually

called

the (i,j)th in the big, bad world, is there a better way to do it
than
this, which I currently use?

      idx  =: (1 { [) { ] {~ 0 { [

      2 1 idx 4 4 $i.16

9

I notice that if { takes an array as left arg, it merely returns
the

given

rows of that array, rather than the required indexed element.
So I can't do, for instance,  (2 1) { 4 4 $i.16 and get what I
want
Furher, I wander if there is a more generic way of writing this so
that

it

would work automatically for rank-3 arrays and greater.

----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm



--
Sent from Gmail Mobile

----------------------------------------------------------------------
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



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to