Y=:100000 5 $1
   X=:i.100000
   ts 'X(1 })"0 1 Y'
0.056829609 2098880
   ts 'X(1 })&.|: Y'
0.016572303 4196544
   ts 'X(<a:;1)} Y'
0.008775772 4195904

R.E. Boss


-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Oleg Kobchenko
Verzonden: donderdag 19 april 2007 7:21
Aan: Programming forum
Onderwerp: Re: [Jprogramming] amend and rank

$x must be a suffix of $m{y

   1 4 6 3 2 (1 })"0 1 tst
2 1 2
2 4 2
2 6 2
2 3 2
2 2 2
   1 4 6 (1 }) tst
2 2 2
1 4 6
2 2 2
2 2 2
2 2 2
   1 (1 }) tst
2 2 2
1 1 1
2 2 2
2 2 2
2 2 2
   1 (0 }) ,:tst
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
   
--- "Sherlock, Ric" <[EMAIL PROTECTED]> wrote:

> When using x m}"1 y to amend columns of y.
> Why can m only be a single-item list (rank 1) and why does x need to be
> rank 2?
> 
> e.g.
>    ]tst=:(5 3$2)
> 2 2 2
> 2 2 2
> 2 2 2
> 2 2 2
> 2 2 2
>    (1 4 6 3 2) (1)}"1 tst
> |rank error
> |   (1 4 6 3 2)    (1)}"1 tst
>    (1 4 6 3 2) (,1)}"1 tst
> |length error
> |   (1 4 6 3 2)    (,1)}"1 tst
>    (,.1 4 6 3 2) (,1)}"1 tst
> 2 1 2
> 2 4 2
> 2 6 2
> 2 3 2
> 2 2 2
>    (,.1 4 6 3 2) (0 2)}"1 tst
> |length error
> |   (,.1 4 6 3 2)    (0 2)}"1 tst
> 
> Yet the following are fine?  
>    |: (1 4 6 3 2) (1)} |: tst
> 2 1 2
> 2 4 2
> 2 6 2
> 2 3 2
> 2 2 2
>    |: (1 4 6 3 2) (0 2)} |: tst
> 1 2 1
> 4 2 4
> 6 2 6
> 3 2 3
> 2 2 2
> 
> I suspect this has to do with making sure the prefixes of the left &
> frames right frames match. Am I on the right track?
> 
> Is working with the transpose the best way to accomplish something like
> this?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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

Reply via email to