DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22091>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22091

Adding tolerance to double[] search methods in ArrayUtils

           Summary: Adding tolerance to double[] search methods in
                    ArrayUtils
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Lang
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


It is sometimes useful to for the presence of a double within a given tolerance.
 For example, does this double[] array contain 3.054 +/- 0.001?

The patch attached adds new methods which use the DoubleRange test elements of
an array:

ArrayUtils.indexOf(double[] array, double valueToFind, double tolerance)

ArrayUtils.indexOf(double[] array, double valueToFind, int startIndex, double
tolerance);

ArrayUtils.lastIndexOf(double[] array, double valueToFind, int startIndex,
double tolerance);

ArrayUtils.contains(double[] array, double valueToFind, double tolerance);

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to