当前位置: 首页>>代码示例>>Java>>正文


Java LocalizedFormats.EMPTY_SELECTED_ROW_INDEX_ARRAY属性代码示例

本文整理汇总了Java中org.apache.commons.math3.exception.util.LocalizedFormats.EMPTY_SELECTED_ROW_INDEX_ARRAY属性的典型用法代码示例。如果您正苦于以下问题:Java LocalizedFormats.EMPTY_SELECTED_ROW_INDEX_ARRAY属性的具体用法?Java LocalizedFormats.EMPTY_SELECTED_ROW_INDEX_ARRAY怎么用?Java LocalizedFormats.EMPTY_SELECTED_ROW_INDEX_ARRAY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.commons.math3.exception.util.LocalizedFormats的用法示例。


在下文中一共展示了LocalizedFormats.EMPTY_SELECTED_ROW_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);
    }
}
 
开发者ID:biocompibens,项目名称:SME,代码行数:37,代码来源:MatrixUtils.java

示例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);
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:36,代码来源:MatrixUtils.java


注:本文中的org.apache.commons.math3.exception.util.LocalizedFormats.EMPTY_SELECTED_ROW_INDEX_ARRAY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。