Ric Sherlock wrote:
> 
> Update!
> Ewart Shaw sent me this version which looks to be nicer in all respects.
> 
> findinRows=: +./@((*. +./\.)/@|:@(=/))
> 
> On Fri, Aug 19, 2011 at 9:28 AM, Ric Sherlock <[email protected]> wrote:
>> Thanks to everyone for the interesting approaches. I enjoyed
>> dissecting the different thinking processes.
>>
>> As Marshall points out, not all the solutions will work on lists that
>> contain non-unique characters which I think is a desirable
>> characteristic. His development of Raul's approach seems to have the
>> best combination of generality, performance and simplicity.
>>
>> findinRows=: [: *@#@> [: ([ #~ (< {:))&.>/ <@I.@(=/~)
>>
> [...]
> 
Shaw's solution is really nice.  Let's not forget though that
Marshall's is more general.

Straightforward simplification of the later is to replace

([ #~ (< {:))

by

((< {:) # [)


-- 
View this message in context: 
http://old.nabble.com/Search-for-ordered-letters-within-lines-of-matrix-tp32287342s24193p32294763.html
Sent from the J Programming mailing list archive at Nabble.com.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to