comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Fast way to find the same value in an array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Fast way to find the same value in an array [message #49287 is a reply to message #49285] Sun, 09 July 2006 08:10 Go to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
Instead of comparing each point with every other, suppose you do this:

- cut up your space into NxNxN subspaces (N=10, say)
- sort your points into each subspace
- for each subspace, consider the problem again, but including the
neighbouring subspaces. So now you have 27.N^3 easier sub-problems.
- either solve these directly (now 27.1e7/N^3 ~ 250,000 points) or
better, if you wrote the function well, feed these sub-problems back in
for a recursive solution.

regards,
Greg
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: How to perform a diagramm like these ?
Next Topic: How can I display truecolor image on a map?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:53:38 PDT 2025

Total time taken to generate the page: 1.20115 seconds