MATH-854: populated throws clause of AbstractFieldMatrix.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1392743 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9f663a15e6
commit
72051d7f6d
|
@ -512,7 +512,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public void setRowMatrix(final int row, final FieldMatrix<T> matrix)
|
public void setRowMatrix(final int row, final FieldMatrix<T> matrix)
|
||||||
throws OutOfRangeException {
|
throws OutOfRangeException, MatrixDimensionMismatchException {
|
||||||
checkRowIndex(row);
|
checkRowIndex(row);
|
||||||
final int nCols = getColumnDimension();
|
final int nCols = getColumnDimension();
|
||||||
if ((matrix.getRowDimension() != 1) ||
|
if ((matrix.getRowDimension() != 1) ||
|
||||||
|
@ -544,7 +544,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public void setColumnMatrix(final int column, final FieldMatrix<T> matrix)
|
public void setColumnMatrix(final int column, final FieldMatrix<T> matrix)
|
||||||
throws OutOfRangeException {
|
throws OutOfRangeException, MatrixDimensionMismatchException {
|
||||||
checkColumnIndex(column);
|
checkColumnIndex(column);
|
||||||
final int nRows = getRowDimension();
|
final int nRows = getRowDimension();
|
||||||
if ((matrix.getRowDimension() != nRows) ||
|
if ((matrix.getRowDimension() != nRows) ||
|
||||||
|
@ -560,13 +560,14 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public FieldVector<T> getRowVector(final int row) {
|
public FieldVector<T> getRowVector(final int row)
|
||||||
|
throws OutOfRangeException {
|
||||||
return new ArrayFieldVector<T>(field, getRow(row), false);
|
return new ArrayFieldVector<T>(field, getRow(row), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public void setRowVector(final int row, final FieldVector<T> vector)
|
public void setRowVector(final int row, final FieldVector<T> vector)
|
||||||
throws OutOfRangeException {
|
throws OutOfRangeException, MatrixDimensionMismatchException {
|
||||||
checkRowIndex(row);
|
checkRowIndex(row);
|
||||||
final int nCols = getColumnDimension();
|
final int nCols = getColumnDimension();
|
||||||
if (vector.getDimension() != nCols) {
|
if (vector.getDimension() != nCols) {
|
||||||
|
@ -580,13 +581,14 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public FieldVector<T> getColumnVector(final int column) {
|
public FieldVector<T> getColumnVector(final int column)
|
||||||
|
throws OutOfRangeException {
|
||||||
return new ArrayFieldVector<T>(field, getColumn(column), false);
|
return new ArrayFieldVector<T>(field, getColumn(column), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public void setColumnVector(final int column, final FieldVector<T> vector)
|
public void setColumnVector(final int column, final FieldVector<T> vector)
|
||||||
throws OutOfRangeException {
|
throws OutOfRangeException, MatrixDimensionMismatchException {
|
||||||
|
|
||||||
checkColumnIndex(column);
|
checkColumnIndex(column);
|
||||||
final int nRows = getRowDimension();
|
final int nRows = getRowDimension();
|
||||||
|
@ -614,7 +616,8 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public void setRow(final int row, final T[] array) throws OutOfRangeException {
|
public void setRow(final int row, final T[] array)
|
||||||
|
throws OutOfRangeException, MatrixDimensionMismatchException {
|
||||||
checkRowIndex(row);
|
checkRowIndex(row);
|
||||||
final int nCols = getColumnDimension();
|
final int nCols = getColumnDimension();
|
||||||
if (array.length != nCols) {
|
if (array.length != nCols) {
|
||||||
|
@ -641,7 +644,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public void setColumn(final int column, final T[] array)
|
public void setColumn(final int column, final T[] array)
|
||||||
throws OutOfRangeException {
|
throws OutOfRangeException, MatrixDimensionMismatchException {
|
||||||
checkColumnIndex(column);
|
checkColumnIndex(column);
|
||||||
final int nRows = getRowDimension();
|
final int nRows = getRowDimension();
|
||||||
if (array.length != nRows) {
|
if (array.length != nRows) {
|
||||||
|
@ -828,7 +831,8 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor,
|
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||||
final int startRow, final int endRow,
|
final int startRow, final int endRow,
|
||||||
final int startColumn, final int endColumn) {
|
final int startColumn, final int endColumn)
|
||||||
|
throws NumberIsTooSmallException, OutOfRangeException {
|
||||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||||
visitor.start(getRowDimension(), getColumnDimension(),
|
visitor.start(getRowDimension(), getColumnDimension(),
|
||||||
startRow, endRow, startColumn, endColumn);
|
startRow, endRow, startColumn, endColumn);
|
||||||
|
@ -845,7 +849,8 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||||
final int startRow, final int endRow,
|
final int startRow, final int endRow,
|
||||||
final int startColumn, final int endColumn) {
|
final int startColumn, final int endColumn)
|
||||||
|
throws NumberIsTooSmallException, OutOfRangeException {
|
||||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||||
visitor.start(getRowDimension(), getColumnDimension(),
|
visitor.start(getRowDimension(), getColumnDimension(),
|
||||||
startRow, endRow, startColumn, endColumn);
|
startRow, endRow, startColumn, endColumn);
|
||||||
|
@ -932,14 +937,16 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>>
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public T walkInOptimizedOrder(final FieldMatrixChangingVisitor<T> visitor,
|
public T walkInOptimizedOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||||
final int startRow, final int endRow,
|
final int startRow, final int endRow,
|
||||||
final int startColumn, final int endColumn) {
|
final int startColumn, final int endColumn)
|
||||||
|
throws NumberIsTooSmallException, OutOfRangeException {
|
||||||
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public T walkInOptimizedOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
public T walkInOptimizedOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||||
final int startRow, final int endRow,
|
final int startRow, final int endRow,
|
||||||
final int startColumn, final int endColumn) {
|
final int startColumn, final int endColumn)
|
||||||
|
throws NumberIsTooSmallException, OutOfRangeException {
|
||||||
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue