Linda, bear in mind that Raul was (I think) deriving a tacit improvement
of my explicit verb "c" which had incorporated an explicit loop.
Here it is, again, possibly without gratuitous line-throws:
c =: 3 : 0
m =. >./y
for_i. }.>:i.#y do.
m =. m >. >./ i ([ * <./\) y
end.
)
It happens to include neither @ and @: which you deprecate, nor [: which
you prefer.
My later modification, cs, not reproduced here, includes an early
stopping condition, which speeds things up, at least for an object like
qq.
Raul and others have posted further improvements to cs.
What you wanted?
Cheers,
Mike
On 28/06/2017 14:45, Linda Alvord wrote:
I turned your verb to a different expression. Can you write my version as an
explicit verb?
f=: [:>./([:([:>:i.)#)([: >./[ * <./\)"0 1 ]
f qq
7030779
Linda
-----Original Message-----
From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf
Of Raul Miller
Sent: Saturday, June 24, 2017 2:38 PM
To: Programming forum <programm...@jsoftware.com>
Subject: Re: [Jprogramming] largest rectangle problem
Oops, I used <./ instead of >./ when I typed that in.
Should have been:
C=: >./@(>:@i.@# >./@([ * <./\)"0 1 ])
I am not quite sure how I made that mistake - just sloppy, I guess.
Thanks,
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm