Hmm, I was thinking that /because/ we are talking of primitive arrays and not Object arrays, this would make things simpler in the sense that a Comparator is not needed. Does simple like isAscending(double[]) fit in [lang] and ArrayUtils as opposed to adding something to [primitives]? Or is this too much of a math-like query and should stay in math?
Of course, one could argue, that starting to add isThisOrThat type of
methods might open the door to other requests that might not belong.
In the XP way, I would not be against adding the two is- methods for the primitive datatypes [math] needs, no more, no less. In this case we are only talking about double?
I'd like to hear what others have to say.
In a few places in [math] we need to verify that double[] array arguments
are sorted.
I did not look at the code but I am wondering: what if the array is not
sorted properly? Does [math] throw an exception, sort the array and
proceed?
Gary
Currently, we throw IllegalArgumentException, since the arrays in question are actual parameters that are supposed to represent partition points and if they are not in (strictly) ascending order, the client has misused the API.
Phil
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
