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

Home » Public Forums » archive » Re: What? You can't histogram a string 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: What? You can't histogram a string array? [message #51545 is a reply to message #51544] Tue, 28 November 2006 10:12 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Tue, 28 Nov 2006 09:52:06 -0800, Braedley wrote:

>
> Braedley wrote:
>> JD, a small nitpick: ind_int_sort will occasionally take the index from
>> [a, b], and not from just a. This can quickly lead to out of bounds
>> conditions if the user doesn't want to index [a, b], but just wants to
>> index a. In my case, a is a column from a 2D string array, where b is
>> just a 1D string array. I think a where statement is all that is
>> needed to fix this (I know, it'll slow it down for large sets).
>>
>> Braedley
>
> Actually, the fix was much easier than previously thought. Instead of
> return, srt[wh]
> use
> return, srt[wh]<srt[wh+1]
>
> I haven't done any tests, but it shouldn't take much longer for sparse
> or small sets.

That is a clever fix, but if the ordering of elements from a and b is
random, and if you have a repeated set in a match a repeated set in b, and
their interleaved sorted order is random, you'll get back a random number
of the matching repeats (not 1, as was intended).

See my other post though, and let me know your findings w.r.t. SORT.

Thanks,

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Overlay Point Sources on Maps
Next Topic: What? You can't histogram a string array?

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

Current Time: Sat Oct 11 08:02:34 PDT 2025

Total time taken to generate the page: 1.27978 seconds