MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Finding local maxima in multidimensional array (efficiently)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114308] Re: Finding local maxima in multidimensional array (efficiently)
  • From: Julian Francis <julian.w.francis at gmail.com>
  • Date: Tue, 30 Nov 2010 04:06:40 -0500 (EST)
  • References: <ico3gv$olk$1@smc.vnet.net> <icqgl2$mfv$1@smc.vnet.net> <ictfvu$mif$1@smc.vnet.net>

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.


  • Prev by Date: Re: Why ParallelTable does not use CUDA
  • Next by Date: Colors are off in Texture
  • Previous by thread: Re: Finding local maxima in multidimensional array (efficiently)
  • Next by thread: Problems with Mathematica 8.0 Solve