List of usage examples for org.apache.commons.math3.exception.util LocalizedFormats INSUFFICIENT_ROWS_AND_COLUMNS
LocalizedFormats INSUFFICIENT_ROWS_AND_COLUMNS
To view the source code for org.apache.commons.math3.exception.util LocalizedFormats INSUFFICIENT_ROWS_AND_COLUMNS.
Click Source Link
From source file:Rotationforest.Covariance.java
/** * Throws MathIllegalArgumentException if the matrix does not have at least * one column and two rows.//from www . j a va 2 s.c o m * @param matrix matrix to check * @throws MathIllegalArgumentException if the matrix does not contain sufficient data * to compute covariance */ private void checkSufficientData(final RealMatrix matrix) throws MathIllegalArgumentException { int nRows = matrix.getRowDimension(); int nCols = matrix.getColumnDimension(); if (nRows < 2 || nCols < 1) { throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS, nRows, nCols); } }