How to program efficient pattern searches in a list of float numbers?

Paul McGuire ptmcg at austin.rr.com
Mon Sep 19 10:47:25 EDT 2005


Have you tried coding even the brute-force naive search?  It is far
easier to improve an algorithm when you have someplace relatively
concrete to start from.  Plus, the naive approach is most likely to
return a correct result, so that you can regression test your exotic
interval-skipping, second-derivative conjugate interpolation algorithm.
:)

In sum, I started to think through your problem this morning, and yes,
I can visualize the rectangles floating across the 2D curve, and yes, I
can picture that there are likely to be shortcuts and optimizations
over the brute-force "check every index" approach.  But really, you
*should* do some of the work yourself...

-- Paul




More information about the Python-list mailing list