Java Code Examples for org.apache.commons.math3.exception.util.LocalizedFormats#INSUFFICIENT_ROWS_AND_COLUMNS

The following examples show how to use org.apache.commons.math3.exception.util.LocalizedFormats#INSUFFICIENT_ROWS_AND_COLUMNS . 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: Covariance.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws MathIllegalArgumentException if the matrix does not have at least
 * one column and two rows.
 * @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);
    }
}
 
Example 2
Source File: PearsonsCorrelation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws MathIllegalArgumentException if the matrix does not have at least
 * two columns and two rows.
 *
 * @param matrix matrix to check for sufficiency
 * @throws MathIllegalArgumentException if there is insufficient data
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                                               nRows, nCols);
    }
}
 
Example 3
Source File: Covariance.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 * @param matrix matrix to check
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(
                LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                nRows, nCols);
    }
}
 
Example 4
Source File: PearsonsCorrelation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 *
 * @param matrix matrix to check for sufficiency
 * @throws MathIllegalArgumentException if there is insufficient data
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                                               nRows, nCols);
    }
}
 
Example 5
Source File: Covariance.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 * @param matrix matrix to check
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(
                LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                nRows, nCols);
    }
}
 
Example 6
Source File: PearsonsCorrelation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 *
 * @param matrix matrix to check for sufficiency
 * @throws MathIllegalArgumentException if there is insufficient data
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                                               nRows, nCols);
    }
}
 
Example 7
Source File: Covariance.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws MathIllegalArgumentException if the matrix does not have at least
 * one column and two rows.
 * @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);
    }
}
 
Example 8
Source File: PearsonsCorrelation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 *
 * @param matrix matrix to check for sufficiency
 * @throws MathIllegalArgumentException if there is insufficient data
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                                               nRows, nCols);
    }
}
 
Example 9
Source File: Covariance.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 * @param matrix matrix to check
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(
                LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                nRows, nCols);
    }
}
 
Example 10
Source File: PearsonsCorrelation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 *
 * @param matrix matrix to check for sufficiency
 * @throws MathIllegalArgumentException if there is insufficient data
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                                               nRows, nCols);
    }
}
 
Example 11
Source File: Covariance.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws MathIllegalArgumentException if the matrix does not have at least
 * one column and two rows.
 * @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);
    }
}
 
Example 12
Source File: PearsonsCorrelation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 *
 * @param matrix matrix to check for sufficiency
 * @throws MathIllegalArgumentException if there is insufficient data
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                                               nRows, nCols);
    }
}
 
Example 13
Source File: Covariance.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws MathIllegalArgumentException if the matrix does not have at least
 * one column and two rows.
 * @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);
    }
}
 
Example 14
Source File: PearsonsCorrelation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws IllegalArgumentException of the matrix does not have at least
 * two columns and two rows
 *
 * @param matrix matrix to check for sufficiency
 * @throws MathIllegalArgumentException if there is insufficient data
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                                               nRows, nCols);
    }
}
 
Example 15
Source File: Covariance.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws MathIllegalArgumentException if the matrix does not have at least
 * one column and two rows.
 * @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);
    }
}
 
Example 16
Source File: PearsonsCorrelation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Throws MathIllegalArgumentException if the matrix does not have at least
 * two columns and two rows.
 *
 * @param matrix matrix to check for sufficiency
 * @throws MathIllegalArgumentException if there is insufficient data
 */
private void checkSufficientData(final RealMatrix matrix) {
    int nRows = matrix.getRowDimension();
    int nCols = matrix.getColumnDimension();
    if (nRows < 2 || nCols < 2) {
        throw new MathIllegalArgumentException(LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS,
                                               nRows, nCols);
    }
}