1 { $ $ 2 |. ,
Linda
-Original Message-
From: [email protected]
[mailto:[email protected]] On Behalf Of Kip Murray
Sent: Friday, July 11, 2014 11:09 PM
To: [email protected]
Subject: Re: [Jprogramming] speaking of amen
'Pascal Jasmin' asked:
>what verb v (or I guess adverb is ok) could I use to get
>
> i.2 3 2
> 0 1
> 2 3
> 4 5
>
> 6 7
> 8 9
>10 11
>
>0 1 1 v i. 2 3 2
>0 1
>8 9
>10 11
So you want some bastard item merged out from the original ones.
This is exactly what monadic } will do, the
v # ]'
NB. dyadic u
filtermodud =: 2 : 'v itemamend ] ,: v # inv [ u v # ]'
- Original Message -
From: R.E. Boss
To: [email protected]
Cc:
Sent: Saturday, July 12, 2014 5:35:06 AM
Subject: Re: [Jprogramming] speaking of amend...
I have itemamend in m
0 1
8 9
10 11
Linda
-Original Message-
From: [email protected]
[mailto:[email protected] ] On
Behalf Of Linda Alvord
Sent: Friday, July 11, 2014 10:53 PM
To: [email protected]
Subject: Re: [Jprogramming] speaking of amend...
lto:[email protected] ] On
Behalf Of Linda Alvord
Sent: Friday, July 11, 2014 10:53 PM
To: [email protected]
Subject: Re: [Jprogramming] speaking of amend...
I'm sure I'll learn lots of better ways than this.
f=: 13 :'3 1 2$,(x}i.2 3){((*/0 1{$y),2)$,y'
: Friday, July 11, 2014 10:53 PM
To: [email protected]
Subject: Re: [Jprogramming] speaking of amend...
I'm sure I'll learn lots of better ways than this.
f=: 13 :'3 1 2$,(x}i.2 3){((*/0 1{$y),2)$,y'
f
4 : '3 1 2$,(x}i.2 3){((*/0 1{$y),2)$,y'
rom: [email protected] [mailto:programming-
> [email protected]] On Behalf Of Kip Murray
> Sent: zaterdag 12 juli 2014 5:09
> To: [email protected]
> Subject: Re: [Jprogramming] speaking of amend...
>
>v =: (-. , ])@[ # ,/@]
>0 1 1 v i. 2 3 2
>
Hi LInda,
Well they look the same, but the contents of the boxes formed by (;&.>) are
vectors of shape 1 and the contents of the boxes of formed by (<"0) are
scalars,
$&.>(; &. >) i. 2 3 2
┌─┬─┐
│1│1│
├─┼─┤
│1│1│
├─┼─┤
│1│1│
└─┴─┘
┌─┬─┐
│1│1│
├─┼─┤
│1│1│
├─┼─┤
│1│1│
└─┴─┘
$&.>(<"0) i.
nal Message-
From: [email protected]
[mailto:[email protected]] On Behalf Of 'Pascal
Jasmin' via Programming
Sent: Friday, July 11, 2014 8:57 PM
To: Programming forum
Subject: [Jprogramming] speaking of amend...
what verb v (or I guess adverb i
I would not generalize to higher rank arrays without a model of why I'd be
using them.
In other words, v=: {"_1 |:~&0 2 is probably good enough.
There are some interesting contradictions here - while one needs to be
comfortable thinking mathematically to get decent performance out of a
system, us
missing isNoun
isNoun =: (0 = 4!:0 ( :: 0:))@:<
- Original Message -
From: 'Pascal Jasmin' via Programming
To: "[email protected]"
Cc:
Sent: Saturday, July 12, 2014 12:16:24 AM
Subject: Re: [Jprogramming] speaking of amend... filtermod a useful
9
- Original Message -
From: Kip Murray
To: "[email protected]"
Cc:
Sent: Friday, July 11, 2014 11:09:10 PM
Subject: Re: [Jprogramming] speaking of amend...
v =: (-. , ])@[ # ,/@]
0 1 1 v i. 2 3 2
0 1
8 9
10 11
On Friday, July 11, 2014, Linda Alvord
[email protected]"
Cc:
Sent: Friday, July 11, 2014 11:09:10 PM
Subject: Re: [Jprogramming] speaking of amend...
v =: (-. , ])@[ # ,/@]
0 1 1 v i. 2 3 2
0 1
8 9
10 11
On Friday, July 11, 2014, Linda Alvord wrote:
> I made it too hard because I thought I had seen car
,y'
>
>0 1 1 f i.2 3 2
> 0 1
>
> 8 9
>
> 10 11
>
> Linda
>
> -Original Message-
> From: [email protected]
> [mailto:[email protected] ] On
> Behalf Of 'Pascal
> Jasmin' via Programming
> Sen
lto:[email protected]] On Behalf Of Linda Alvord
Sent: Friday, July 11, 2014 10:53 PM
To: [email protected]
Subject: Re: [Jprogramming] speaking of amend...
I'm sure I'll learn lots of better ways than this.
f=: 13 :'3 1 2$,(x}i.2 3){((*/0 1{$y),2)$,y
e.com
[mailto:[email protected]] On Behalf Of 'Pascal
Jasmin' via Programming
Sent: Friday, July 11, 2014 8:57 PM
To: Programming forum
Subject: [Jprogramming] speaking of amend...
what verb v (or I guess adverb is ok) could I use to get
0 1 1 v i. 2 3 2
0 1
8 9
thank you Marshall and Dan,
Similar but not as nice as both your solutions is the simpler:
> 0 1 1 } <"1 i. 2 3 2
- Original Message -
From: Marshall Lochbaum
To: 'Pascal Jasmin' via Programming
Cc:
Sent: Friday, July 11, 2014 10:07:53 PM
Subject: Re: [Jpro
My first instinct would be
v =: ({"_1) 1 0 2&|:
although this does not generalize to higher-rank arrays without a little
work. The following adverb also works, but goes through boxes and
consequently is probably a bit inefficient.
v =: } (&.:(<"1))
Marshall
On Fri, Jul 11, 2014 at 05:56:49P
Oh, I see, using } isn't a requirement. You just want the result. Then
using { would be simpler:
v =: ({~ (;&.>i.@#))~
0 1 1 v i. 2 3 2
0 1
8 9
10 11
-Dan
- Original Message ---
Subject: Re: [Jprogramming] speak
Would (#"0~ #)&>/`(1 {:: ])}@:,&< do?
oneOrTother =: (#"0~ #)&>/`(1 {:: ])}@:,&<
0 1 1 oneOrTother i. 2 3 2
0 1
8 9
10 11
-Dan
- Original Message -------
Subject: [Jprogramming] speaking of
what verb v (or I guess adverb is ok) could I use to get
0 1 1 v i. 2 3 2
0 1
8 9
10 11
i.2 3 2
0 1
2 3
4 5
6 7
8 9
10 11
--
For information about J forums see http://www.jsoftware.com/forums.htm
21 matches
Mail list logo