List of usage examples for org.apache.commons.math3.exception.util LocalizedFormats INSUFFICIENT_DATA_FOR_T_STATISTIC
LocalizedFormats INSUFFICIENT_DATA_FOR_T_STATISTIC
To view the source code for org.apache.commons.math3.exception.util LocalizedFormats INSUFFICIENT_DATA_FOR_T_STATISTIC.
Click Source Link
From source file:embedded2.ESecure.TTest.java
/** * Check sample data.//from w w w . j a v a 2 s . c o m * * @param data Sample data. * @throws NullArgumentException if {@code data} is {@code null}. * @throws NumberIsTooSmallException if there is not enough sample data. */ private static void checkSampleData(final double[] data) throws NullArgumentException, NumberIsTooSmallException { if (data == null) { throw new NullArgumentException(); } if (data.length < 2) { throw new NumberIsTooSmallException(LocalizedFormats.INSUFFICIENT_DATA_FOR_T_STATISTIC, data.length, 2, true); } }
From source file:embedded2.ESecure.TTest.java
/** * Check sample data./*from w w w . j a v a 2 s . c om*/ * * @param stat Statistical summary. * @throws NullArgumentException if {@code data} is {@code null}. * @throws NumberIsTooSmallException if there is not enough sample data. */ private static void checkSampleData(final StatisticalSummary stat) throws NullArgumentException, NumberIsTooSmallException { if (stat == null) { throw new NullArgumentException(); } if (stat.getN() < 2) { throw new NumberIsTooSmallException(LocalizedFormats.INSUFFICIENT_DATA_FOR_T_STATISTIC, stat.getN(), 2, true); } }