本文整理汇总了Java中org.apache.commons.math3.exception.util.LocalizedFormats.EMPTY_SELECTED_COLUMN_INDEX_ARRAY属性的典型用法代码示例。如果您正苦于以下问题:Java LocalizedFormats.EMPTY_SELECTED_COLUMN_INDEX_ARRAY属性的具体用法?Java LocalizedFormats.EMPTY_SELECTED_COLUMN_INDEX_ARRAY怎么用?Java LocalizedFormats.EMPTY_SELECTED_COLUMN_INDEX_ARRAY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.math3.exception.util.LocalizedFormats
的用法示例。
在下文中一共展示了LocalizedFormats.EMPTY_SELECTED_COLUMN_INDEX_ARRAY属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkSubMatrixIndex
/**
* Check if submatrix ranges indices are valid.
* Rows and columns are indicated counting from 0 to n-1.
*
* @param m Matrix.
* @param selectedRows Array of row indices.
* @param selectedColumns Array of column indices.
* @throws NullArgumentException if {@code selectedRows} or
* {@code selectedColumns} are {@code null}.
* @throws NoDataException if the row or column selections are empty (zero
* length).
* @throws OutOfRangeException if row or column selections are not valid.
*/
public static void checkSubMatrixIndex(final AnyMatrix m,
final int[] selectedRows,
final int[] selectedColumns)
throws NoDataException, NullArgumentException, OutOfRangeException {
if (selectedRows == null) {
throw new NullArgumentException();
}
if (selectedColumns == null) {
throw new NullArgumentException();
}
if (selectedRows.length == 0) {
throw new NoDataException(LocalizedFormats.EMPTY_SELECTED_ROW_INDEX_ARRAY);
}
if (selectedColumns.length == 0) {
throw new NoDataException(LocalizedFormats.EMPTY_SELECTED_COLUMN_INDEX_ARRAY);
}
for (final int row : selectedRows) {
checkRowIndex(m, row);
}
for (final int column : selectedColumns) {
checkColumnIndex(m, column);
}
}
示例2: checkSubMatrixIndex
/**
* Check if submatrix ranges indices are valid.
* Rows and columns are indicated counting from 0 to n-1.
*
* @param m Matrix.
* @param selectedRows Array of row indices.
* @param selectedColumns Array of column indices.
* @throws NullArgumentException if {@code selectedRows} or
* {@code selectedColumns} are {@code null}.
* @throws NoDataException if the row or column selections are empty (zero
* length).
* @throws OutOfRangeException if row or column selections are not valid.
*/
public static void checkSubMatrixIndex(final AnyMatrix m,
final int[] selectedRows,
final int[] selectedColumns) {
if (selectedRows == null) {
throw new NullArgumentException();
}
if (selectedColumns == null) {
throw new NullArgumentException();
}
if (selectedRows.length == 0) {
throw new NoDataException(LocalizedFormats.EMPTY_SELECTED_ROW_INDEX_ARRAY);
}
if (selectedColumns.length == 0) {
throw new NoDataException(LocalizedFormats.EMPTY_SELECTED_COLUMN_INDEX_ARRAY);
}
for (final int row : selectedRows) {
checkRowIndex(m, row);
}
for (final int column : selectedColumns) {
checkColumnIndex(m, column);
}
}