List of usage examples for org.apache.commons.math3.exception.util LocalizedFormats DIFFERENT_ROWS_LENGTHS
LocalizedFormats DIFFERENT_ROWS_LENGTHS
To view the source code for org.apache.commons.math3.exception.util LocalizedFormats DIFFERENT_ROWS_LENGTHS.
Click Source Link
From source file:org.gitools.analysis.groupcomparison.format.math33Preview.MathArrays.java
/** * Throws DimensionMismatchException if the input array is not rectangular. * * @param in array to be tested//from w w w .j ava2 s. com * @throws NullArgumentException if input array is null * @throws DimensionMismatchException if input array is not rectangular * @since 3.1 */ public static void checkRectangular(final long[][] in) throws NullArgumentException, DimensionMismatchException { MathUtils.checkNotNull(in); for (int i = 1; i < in.length; i++) { if (in[i].length != in[0].length) { throw new DimensionMismatchException(LocalizedFormats.DIFFERENT_ROWS_LENGTHS, in[i].length, in[0].length); } } }