[Date Index] [Thread Index] [Author Index]
Re: Finding local maxima in multidimensional array (efficiently)
Ray, Thank you very much for your solution, I had not thought of using Sow and Reap in this way. It looks as if giving the algorithm domain knowledge that all your local maxima will be above a certain value, then thresholding first can save quite a bit of time. It does seem quite a computationally demanding calculation. I've just tested your localMaxima version; it gives the the same answer on the test data set I used as my version. It seems considerably faster than my original version (as well as more compact); My timings are between 5-10 times faster than my original coding. Thanks for that, Julian.