Re: [Jprogramming] Plot Questions

2017-10-30 Thread Raul Miller
That's a good question. require'plot' 'color red; type marker;markersize 2' plot <"1|:0 0,:10 10 works just fine. And, looking at the data: <"1|:0 0,:10 10 ┌┬┐ │0 10│0 10│ └┴┘ ... and dropping the first coordinate pair from the resulting coordinate lists: <"1|:,:10

[Jprogramming] Plot Questions

2017-10-30 Thread 'Skip Cave' via Programming
Here's a simple plot: load 'plot' pd 'reset;color red' pd 'type marker;markersize 2' pd <"1|:0 0,:10 10 pd 'show' 1. The above code plots two points, one at 0,0 and one at 10,10. How can I plot just ONE point? The following code shows NO dots at all: load 'plot' pd 'reset;color red' pd 't

Re: [Jprogramming] J806 beta-7

2017-10-30 Thread Devon McCormick
To illustrate my issue with the missing image-processing routines, first look at my existing J 8.04 running in jconsole: load '~addons/ide/qt/qt.ijs' readimg_jqtide_ 3 : 0 if. m=. wdreadimg (utf8 ,y);wh=. 2$2-2 do. d=. _2 ic memr m,0,(*/wh,4),2 wdreadimg 2#<<0 (|.wh)$ fliprgb^:(-.RGBSE

Re: [Jprogramming] Partitions

2017-10-30 Thread Erling Hellenäs
The original prints each a, accumulates nothing. /Erling Den 2017-10-30 kl. 16:17, skrev Erling Hellenäs: Maybe. I wouldn't know how to measure this. I tried having three r in different sizes, but it was slower :) /Erling Den 2017-10-30 kl. 16:06, skrev Raul Miller: I suspect not.. (but tak

Re: [Jprogramming] Partitions

2017-10-30 Thread Erling Hellenäs
Maybe. I wouldn't know how to measure this. I tried having three r in different sizes, but it was slower :) /Erling Den 2017-10-30 kl. 16:06, skrev Raul Miller: I suspect not.. (but take my timings with a grain of salt - or better yet, do them yourself - I was working with a modified version o

Re: [Jprogramming] Partitions

2017-10-30 Thread Raul Miller
I suspect not.. (but take my timings with a grain of salt - or better yet, do them yourself - I was working with a modified version of S which is quite a bit slower, actually). But I expect that (except for the edge cases where most of the instances of a are used) most of the time in S is spent in

Re: [Jprogramming] Partitions

2017-10-30 Thread Erling Hellenäs
I added the display step. I also modified the index in a, changed them from y to y-1 since J has zero as index origin. I guess 99% of the time is spent in the r=: r,a step. /Erling Den 2017-10-30 kl. 15:43, skrev Raul Miller: Hmm... you're right, that deals with some cases quite a bit better

Re: [Jprogramming] Partitions

2017-10-30 Thread 'mike_liz....@tiscali.co.uk' via Programming
Here's the reasonably constructive approach. Much better than my earlier effort at a constructive approach, but it still generates too much redundancy as x approaches y for larger y. Limited time to do email, so in a bit of a rush... NB. Generate non-zero partitions of y size x 3 mpart 5

Re: [Jprogramming] Partitions

2017-10-30 Thread Raul Miller
Oops, I meant "That said, parRuskey still is more efficient for the case where x = y-1 and and y>3 ..." (It's slower for the case where x=y-2 ...) Sorry about that, -- Raul On Mon, Oct 30, 2017 at 10:43 AM, Raul Miller wrote: > Hmm... you're right, that deals with some cases quite a bit bett

Re: [Jprogramming] Partitions

2017-10-30 Thread Raul Miller
Hmm... you're right, that deals with some cases quite a bit better than mine. I can dip into most of them like this: parRDM=:4 :0 select. x case.1 do. ,.< i.y case.2 do. ((y#2)#:"1 0 }.i.2^y-1) http://jsoftware.com/pipermail/programming/2017-October/049423.html That said, p

Re: [Jprogramming] Partitions

2017-10-30 Thread 'Mike Day' via Programming
I should have special-cased it!!! M Please reply to mike_liz@tiscali.co.uk. Sent from my iPad > On 29 Oct 2017, at 20:12, Erling Hellenäs wrote: > > At x=:10,y=:10 parELMDE generates !10 combinations. If you only need one it's > quite a lot. Lol. > !10 > > 3.6288e6 > > /Erling > >

Re: [Jprogramming] Partitions

2017-10-30 Thread 'Mike Day' via Programming
Yes - even with your improvement, it works by filtering an ever larger array. I’ll post separately a reasonably “constructive” approach, which is closer to Raul’s method in performance, I think. Mike Please reply to mike_liz@tiscali.co.uk. Sent from my iPad > On 29 Oct 2017, at 19

Re: [Jprogramming] J806 beta-7

2017-10-30 Thread chris burke
Ah, I see the website files are correct, but the wiki installation points to the wrong file. I will fix now. On Mon, Oct 30, 2017 at 4:34 AM, chris burke wrote: > I just tried downloading the standard and nonavx linux files and the > libj.so are indeed different. In fact the file sizes on the do

Re: [Jprogramming] J806 beta-7

2017-10-30 Thread chris burke
I just tried downloading the standard and nonavx linux files and the libj.so are indeed different. In fact the file sizes on the download page differ, see http://www.jsoftware.com/download/j806/install. Please try again. On Sun, Oct 29, 2017 at 10:48 PM, Joey K Tuttle wrote: > Downloaded 3 ver

Re: [Jprogramming] Partitions

2017-10-30 Thread Erling Hellenäs
Hi all! Here is the Ruskey algorithm, right from the book. It's a good one, even in J which is not made for this kind of code. Maybe it can be improved? -Project ts=: 6!:2 , 7!:2@] NB. Time and space S =: 4 : 0 if. x=y do.   r=:r,a else.    for_i. i.x do. a=: i (y-1) } a  

Re: [Jprogramming] Partitions

2017-10-30 Thread Erling Hellenäs
Hi all! I have a new version of my original idea. The hopelessly slow one with all combinations in all buckets. It is still very slow compared to the ones we have now, but faster than parEL, at least for high y.    x=:5    y=:8    ts'x parEL y' 4.74682 1.51822e8    ts'x parE y' 0.974468 6.8