Example usage for org.apache.commons.math3.util MathUtils checkFinite

List of usage examples for org.apache.commons.math3.util MathUtils checkFinite

Introduction

In this page you can find the example usage for org.apache.commons.math3.util MathUtils checkFinite.

Prototype

public static void checkFinite(final double[] val) throws NotFiniteNumberException 

Source Link

Document

Check that all the elements are real numbers.

Usage

From source file:cz.cuni.lf1.lge.ThunderSTORM.results.ModifiedLoess.java

/**
 * Check that all elements of an array are finite real numbers.
 *
 * @param values Values array.//from ww  w.j av a  2s.  c  o  m
 * @throws org.apache.commons.math3.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]);
    }
}