Re: [Jprogramming] a backtracking conjunction

2015-08-31 Thread 'Pascal Jasmin' via Programming
appologies if repost backtrack =: 2 : '] ([`]@.v"_) u' NB.do u if (] v u) is true otherwise undo. v is dyad, x is original y. basically uses v to select from result of u or original y. true "keeps" result of u the v expression is full rank and must return a single boolean value. Use @:]

Re: [Jprogramming] Pattern Puzzle

2015-08-31 Thread Jon Hough
Cyc =: i. |."(0 1) i. f=: (|:@:(] , 0&{),0&{)@: Cyc > From: thekipmur...@gmail.com > Date: Mon, 31 Aug 2015 07:35:07 + > To: programm...@jsoftware.com > Subject: [Jprogramming] Pattern Puzzle > > This is a resend of a message I tried to send earlier. --Kip Murray > > -- Forwar

Re: [Jprogramming] Pattern Puzzle

2015-08-31 Thread Mike Day
This is quite neat, though Thunderbird will probably spoil it: (i.$~2#>:) 3 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 Mike On 31/08/2015 08:35, Kip Murray wrote: This is a resend of a message I tried to send earlier. --Kip Murray -- Forwarded message - From: Kip Murray Dat

Re: [Jprogramming] Pattern Puzzle

2015-08-31 Thread 'Pascal Jasmin' via Programming
I have (] ([ , ,.~) |."0 1)&i.~ From: Kip Murray To: "programm...@jsoftware.com" Sent: Sunday, August 30, 2015 9:27 PM Subject: [Jprogramming] Pattern Puzzle Write a verb pt which produces the pattern shown below. --Kip Murray pt 3 0 1 2 0 1 2 0 1 2 0

Re: [Jprogramming] Pattern Puzzle

2015-08-31 Thread R.E. Boss
(|+/~@i.@>:)3 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 (| i.@(,~)@>:)3 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 R.E. Boss Van: programming-boun...@forums.jsoftware.com namens Don Guinn Verzonden: maandag 31 augustus 2015 15:56 Aan: Programming forum Onderwerp: R

Re: [Jprogramming] Pattern Puzzle

2015-08-31 Thread Raul Miller
You do not actually need the inner parenthesis here (| i.@,~@>:)3 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 Though even with that change, Mike Day's approach is still more concise, (and more efficient, in space and time): (i.$~2#>:) 3 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 timespacex '(| i.@,~@>:)1000'

[Jprogramming] forward substitution and Back substitution for LU decamp and the like

2015-08-31 Thread Thomas McGuire
I have been playing around with creating forward substitution and backward substitution J scripts to solve lower and upper triangular matrices of the type you would get by performing LU decomposition on a single square matrix. I could certainly just use matrix divide but this starts to slow down

Re: [Jprogramming] forward substitution and Back substitution for LU decamp and the like

2015-08-31 Thread Raul Miller
Can you double check whether you have posted what you intended? I get b1 %. A1 4.15625 1.375 _0.635417 L1 forsub b1 5 1.375 _0.635417 U1 baksub L1 forsub b1 0.517014 0.941667 _0.0635417 which does not correspond to the result you displayed. Thanks, -- Raul On Mon, Aug 31, 2015 at 9:5

[Jprogramming] video: Ulam's Spiral

2015-08-31 Thread Michal Wallace
Hey all, I made a 15 minute video about a line of J code I wrote a while back: https://www.youtube.com/watch?v=dBC5vnwf6Zw -Michal -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] forward substitution and Back substitution for LU decamp and the like

2015-08-31 Thread Thomas McGuire
Sorry I should have rerun the stuff rather than just pick through my debugging session. The original Matrix ]A1 =: 3 3$1 2 3 2 _4 6 3 _9 _3 1 2 3 2 _4 6 3 _9 _3 LU decomposition triangular matrix L1 and U1 are L1 1 0 0 2 _8 0 3 _15 _12 U1 1 2 3 0 1 0 0 0 1 b1 =: 5 18 6 NB. this i

Re: [Jprogramming] video: Ulam's Spiral

2015-08-31 Thread Rob Hodgkinson
Very nice work Michael, well presented and interesting !! Did you also see Eugene McDonnell’s essays on ‘volutes’ (spirals) in At Play With J (around page 85). Also here … "At Play With J (Edn 2)” paperback