McLean's problem 
Author Message
 McLean's problem


two-column numeric table into a 1-column table of boxes in which each box
contains an infix of the rows of the original table corresponding to
consecutive rows in which the items of the last column are nonnegative.

NB. Locate nonnegative items
m0=. 0: <: [: {: ]

NB. Delete 0's and change all 1's except leading 1 to 0
m1=. ] # 2: </\ 0: , ]

NB. 1-column table of boxed partitions of y delimited by 1's in x
d2=. [: ,. # <;.1~ [: m1 [

NB. Assembled components solve McLean's problem
m3=. m0"1 d2 ]

Eugene McDonnell



Tue, 10 Mar 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Emmett McLean's problem, and my solution

2. APLBUG presents Emmett McLean

3. questions from Emmett McLean

4. reply to Emmett McLean

5. Next MD/DC Local SIGAda meeting (McLean, VA, 8 May)

6. Humor: With Apologies to Buddy Holly and Don McLean

7. Cobol openings in McLean, VA

8. stream('file','c','seek ='x) problem

9. Problem with ''Mailbox''

10. 'No font matching ...' problem

11. J3 problem using wd 'wait'

12. Problem w/ 'window' property

 

 
Powered by phpBB® Forum Software