Java Code Examples for org.apache.commons.math.exception.util.LocalizedFormats#COLUMN_INDEX

The following examples show how to use org.apache.commons.math.exception.util.LocalizedFormats#COLUMN_INDEX . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractFieldMatrix.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Check if a column index is valid.
 *
 * @param column Column index to check.
 * @throws OutOfRangeException if {@code index} is not valid.
 */
protected void checkColumnIndex(final int column) {
    if (column < 0 || column >= getColumnDimension()) {
        throw new OutOfRangeException(LocalizedFormats.COLUMN_INDEX,
                                      column, 0, getColumnDimension() - 1);
    }
}
 
Example 2
Source File: AbstractFieldMatrix.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Check if a column index is valid.
 *
 * @param column Column index to check.
 * @throws OutOfRangeException if {@code index} is not valid.
 */
protected void checkColumnIndex(final int column) {
    if (column < 0 || column >= getColumnDimension()) {
        throw new OutOfRangeException(LocalizedFormats.COLUMN_INDEX,
                                      column, 0, getColumnDimension() - 1);
    }
}
 
Example 3
Source File: AbstractFieldMatrix.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Check if a column index is valid.
 *
 * @param column Column index to check.
 * @throws OutOfRangeException if {@code index} is not valid.
 */
protected void checkColumnIndex(final int column) {
    if (column < 0 || column >= getColumnDimension()) {
        throw new OutOfRangeException(LocalizedFormats.COLUMN_INDEX,
                                      column, 0, getColumnDimension() - 1);
    }
}
 
Example 4
Source File: MatrixUtils.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Check if a column index is valid.
 *
 * @param m Matrix.
 * @param column Column index to check.
 * @throws OutOfRangeException if {@code column} is not a valid index.
 */
public static void checkColumnIndex(final AnyMatrix m, final int column) {
    if (column < 0 || column >= m.getColumnDimension()) {
        throw new OutOfRangeException(LocalizedFormats.COLUMN_INDEX,
                                       column, 0, m.getColumnDimension() - 1);
    }
}
 
Example 5
Source File: MatrixUtils.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Check if a column index is valid.
 *
 * @param m Matrix.
 * @param column Column index to check.
 * @throws OutOfRangeException if {@code column} is not a valid index.
 */
public static void checkColumnIndex(final AnyMatrix m, final int column) {
    if (column < 0 || column >= m.getColumnDimension()) {
        throw new OutOfRangeException(LocalizedFormats.COLUMN_INDEX,
                                       column, 0, m.getColumnDimension() - 1);
    }
}
 
Example 6
Source File: MatrixUtils.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Check if a column index is valid.
 *
 * @param m Matrix.
 * @param column Column index to check.
 * @throws OutOfRangeException if {@code column} is not a valid index.
 */
public static void checkColumnIndex(final AnyMatrix m, final int column) {
    if (column < 0 || column >= m.getColumnDimension()) {
        throw new OutOfRangeException(LocalizedFormats.COLUMN_INDEX,
                                       column, 0, m.getColumnDimension() - 1);
    }
}