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

Home » Public Forums » archive » Re: Search routines
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: Search routines [message #12844 is a reply to message #12829] Fri, 18 September 1998 00:00 Go to previous messageGo to previous message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <MPG.106c1a47e9769edd9896bd@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:

> I thought that was the point of the WHERE function. :-)

I realize that WHERE will do the job, but at very low efficiency. WHERE
makes no assumptions about the list being ordered. It seems to me it has
to check every element of the array, requiring N steps for an N-element
array. This is even worse than a linear search of an ordered list, which
would require an average of N/2 steps. A simple bisection search would be
LOG2(N) on average, which is, of course, very advantageous for large N.

In article <36027091.59F@plato.sr.unh.edu>, Alexander Proussevitch
<alexp@plato.sr.unh.edu> wrote:

> Of course, there is such a routine. Check
>
> UNIQ !!!! It does any kind of search for you.

UNIQ seems to suffer from the same problem as WHERE, and I'm not sure what
use it is with floating point numbers.

Still looking ... ;-)

Ken

--
Dr. Kenneth P. Bowman, Professor 409-862-4060
Department of Meteorology 409-862-4466 fax
Texas A&M University bowmanATcsrp.tamu.edu
College Station, TX 77843-3150 Replace AT with @
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Cumulative total
Next Topic: Re: Multiple plot windows

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

Current Time: Fri Oct 10 16:33:20 PDT 2025

Total time taken to generate the page: 1.04227 seconds