Java Code Examples for org.apache.commons.math.util.MathUtils#checkFinite()

The following examples show how to use org.apache.commons.math.util.MathUtils#checkFinite() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoessInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Check that all elements of an array are finite real numbers.
 *
 * @param values Values array.
 * @throws org.apache.commons.math.exception.NotFiniteNumberException
 * if one of the values is not a finite real number.
 */
private static void checkAllFiniteReal(final double[] values) {
    for (int i = 0; i < values.length; i++) {
        MathUtils.checkFinite(values[i]);
    }
}
 
Example 2
Source File: LoessInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Check that all elements of an array are finite real numbers.
 *
 * @param values Values array.
 * @throws org.apache.commons.math.exception.NotFiniteNumberException
 * if one of the values is not a finite real number.
 */
private static void checkAllFiniteReal(final double[] values) {
    for (int i = 0; i < values.length; i++) {
        MathUtils.checkFinite(values[i]);
    }
}
 
Example 3
Source File: LoessInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Check that all elements of an array are finite real numbers.
 *
 * @param values Values array.
 * @throws org.apache.commons.math.exception.NotFiniteNumberException
 * if one of the values is not a finite real number.
 */
private static void checkAllFiniteReal(final double[] values) {
    for (int i = 0; i < values.length; i++) {
        MathUtils.checkFinite(values[i]);
    }
}