the key to understanding &. is to first understand & , which has separate monad
and dyad understandings.
2 +&+: 3
10
2 +&.+: 3
5
the vi part can be called as v inv
2 + (2 : (':';'v inv (v x) u v y')) +: 3
5
it gets more complicated with nested ones, but you don't understand it till you
understand the complicated one:
16+36
52
2 +&*:&.+: 3
26
I need help understanding why this result happens:
2 +&.*:&.+: 3
3.60555
*: 2 +&.*:&.+: 3
13
why it is not %: 26 ....
*: 2 +(&.*:)(&+:) 3 (easier to follow
52
-: 2 +(&.*:)(&+:) 3 (half of %:52 is %:13)
3.60555
----- Original Message -----
From: Linda Alvord <[email protected]>
To: [email protected]
Cc:
Sent: Friday, April 4, 2014 4:31:37 AM
Subject: Re: [Jprogramming] I want to understand under
The two parts of the definition of Under are equivalent.
X u&.v y ↔ vi (v x) u (v y) Definition of Under
I could write a defition of: . x u&.v y
'
But could not write a similar tacit verb for: vi (v x) u (v y)
So:
g=: 13 :'x(,~&.>)/y'
B g A
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Raul Miller
Sent: Friday, April 04, 2014 4:02 AM
To: Programming forum
Subject: Re: [Jprogramming] I want to understand under
What is h supposed to be doing?
Thanks,
--
Raul
On Fri, Apr 4, 2014 at 2:25 AM, Linda Alvord <[email protected]>wrote:
> Here’s the problem. Hopefully this looks better and fully defines the
> problem.
>
> f=: 13 :' (B=:;:''am pm''),~&.>/A=:<"1 ":":"0>:i.y'
> f 12
> ┌────┬────┬────┬────┬────┬────┬────┬──
> ──┬────┬────┬────┬────┐
> │1 am│2 am│3 am│4 am│5 am│6 am│7 am│8 am│9 am│10am│11am│12am│
> ├────┼────┼────┼────┼────┼────┼────┼──
> ──┼────┼────┼────┼────┤
> │1 pm│2 pm│3 pm│4 pm│5 pm│6 pm│7 pm│8 pm│9 pm│10pm│11pm│12pm│
> └────┴────┴────┴────┴────┴────┴────┴──
> ──┴────┴────┴────┴────┘
> A
> ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐
> │1 │2 │3 │4 │5 │6 │7 │8 │9 │10│11│12│
> └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
> B
> ┌──┬──┐
> │am│pm│
> └──┴──┘
> g=: 13 :'x(,~&.>)/y'
> B g A
> ┌────┬────┬────┬────┬────┬────┬────┬──
> ──┬────┬────┬────┬────┐
> │1 am│2 am│3 am│4 am│5 am│6 am│7 am│8 am│9 am│10am│11am│12am│
> ├────┼────┼────┼────┼────┼────┼────┼──
> ──┼────┼────┼────┼────┤
> │1 pm│2 pm│3 pm│4 pm│5 pm│6 pm│7 pm│8 pm│9 pm│10pm│11pm│12pm│
> └────┴────┴────┴────┴────┴────┴────┴──
> ──┴────┴────┴────┴────┘
> g
> ,~&.>/
>
> NB. x u&.v y ↔ vi (v x) u (v y) Definition of Under
>
>
> I can’t seem to write a simple definition h=: but use the second
> definition of under.
>
> It should have the same result as B g A when you enter B h A
>
> Linda
>
>
>
> ----------------------------------------------------------------------
> 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