List of usage examples for org.apache.commons.math3.exception.util LocalizedFormats AT_LEAST_ONE_ROW
LocalizedFormats AT_LEAST_ONE_ROW
To view the source code for org.apache.commons.math3.exception.util LocalizedFormats AT_LEAST_ONE_ROW.
Click Source Link
From source file:lirmm.inria.fr.math.BigSparseRealMatrix.java
/** * Create a new {@code BigSparseRealMatrix} using the input array as the * underlying data array./* w w w .j ava2 s .c om*/ * * @param data Data for the new matrix. * @throws DimensionMismatchException if {@code d} is not rectangular. * @throws NoDataException if {@code d} i or column dimension is zero. */ public BigSparseRealMatrix(final double[][] data) throws DimensionMismatchException, NoDataException { MathUtils.checkNotNull(data); this.entries = new OpenLongToDoubleHashMap(0.0); rows = data.length; if (rows == 0) { throw new NoDataException(LocalizedFormats.AT_LEAST_ONE_ROW); } columns = data[0].length; if (columns == 0) { throw new NoDataException(LocalizedFormats.AT_LEAST_ONE_COLUMN); } for (int i = 0; i < rows; i++) { for (int j = 0; j < columns; j++) { setEntry(i, j, data[i][j]); } } }