Re: What? You can't histogram a string array? [message #51547 is a reply to message #51546] |
Tue, 28 November 2006 09:52   |
Braedley
Messages: 57 Registered: September 2006
|
Member |
|
|
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.
Braedley
|
|
|