It took me some time before I found
5!:5 <'sprl'
$ ([: /:@; [: <@[`((, {.) ; |.@|:@[EMAIL PROTECTED])@.([EMAIL
PROTECTED]@])&>/^:_ a: , <@i.)
It's hardly faster than spiral and still 130 times slower than involute
ts'sprl 200 300'
0.18375733 4984000
ts'spiral 200 300'
0.24312988 5246208
ts'involute 200 300'
0.0013813464 1049600
R.E. Boss
-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Jose Mario Quintana
Verzonden: woensdag 29 november 2006 5:41
Aan: Programming forum
Onderwerp: RE: [Jprogramming] spiral order
Very impressive, [EMAIL PROTECTED] appears distorted in the archives by the
way.
To: "Programming forum" <[email protected]>
leaner, faster
involute=.$ /:@(+/\)@(,@(<./ {. |:@(1 0 + [EMAIL PROTECTED]@|.)) # +:@<./ $ (,
-)@(1 ,
{:))
vs
spiral=. $ /:@:(*/ {. }:@:(0&({::)@:((([ , {.@:]) ;
|.@:|:@:}.@:])&>/^:_))@:(''&;)@:i.)
(spiral-:involute) 200 300
1
st=.7!:[EMAIL PROTECTED] , 6!:2
st 'spiral 200 300'
5.24621e6 0.389979
st 'involute 200 300'
1.0496e6 0.00278834
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm