MATH-425
Removed deprecated "MatrixVisitorException". Modified affected files. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1034494 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3317eb676c
commit
f3d957dfbe
|
@ -730,8 +730,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -746,8 +745,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -762,8 +760,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
/** {@inheritDoc} */
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -779,9 +776,8 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -794,8 +790,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -810,8 +805,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -826,8 +820,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
/** {@inheritDoc} */
|
||||
public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -844,8 +837,7 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
/** {@inheritDoc} */
|
||||
public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -858,30 +850,26 @@ public abstract class AbstractFieldMatrix<T extends FieldElement<T>> implements
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInOptimizedOrder(final FieldMatrixChangingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInOptimizedOrder(final FieldMatrixChangingVisitor<T> visitor) {
|
||||
return walkInRowOrder(visitor);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInOptimizedOrder(final FieldMatrixPreservingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInOptimizedOrder(final FieldMatrixPreservingVisitor<T> visitor) {
|
||||
return walkInRowOrder(visitor);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInOptimizedOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn) {
|
||||
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T walkInOptimizedOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn) {
|
||||
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
||||
}
|
||||
|
||||
|
|
|
@ -647,8 +647,7 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -663,8 +662,7 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -679,8 +677,7 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
/** {@inheritDoc} */
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -697,8 +694,7 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
/** {@inheritDoc} */
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -711,8 +707,7 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double walkInColumnOrder(final RealMatrixChangingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInColumnOrder(final RealMatrixChangingVisitor visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -727,8 +722,7 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double walkInColumnOrder(final RealMatrixPreservingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInColumnOrder(final RealMatrixPreservingVisitor visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -743,8 +737,7 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
/** {@inheritDoc} */
|
||||
public double walkInColumnOrder(final RealMatrixChangingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -761,8 +754,7 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
/** {@inheritDoc} */
|
||||
public double walkInColumnOrder(final RealMatrixPreservingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -775,30 +767,26 @@ public abstract class AbstractRealMatrix implements RealMatrix {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double walkInOptimizedOrder(final RealMatrixChangingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInOptimizedOrder(final RealMatrixChangingVisitor visitor) {
|
||||
return walkInRowOrder(visitor);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double walkInOptimizedOrder(final RealMatrixPreservingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInOptimizedOrder(final RealMatrixPreservingVisitor visitor) {
|
||||
return walkInRowOrder(visitor);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double walkInOptimizedOrder(final RealMatrixChangingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double walkInOptimizedOrder(final RealMatrixPreservingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
return walkInRowOrder(visitor, startRow, endRow, startColumn, endColumn);
|
||||
}
|
||||
|
||||
|
|
|
@ -435,8 +435,7 @@ public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFi
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -451,8 +450,7 @@ public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFi
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -469,8 +467,7 @@ public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFi
|
|||
@Override
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -487,8 +484,7 @@ public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFi
|
|||
@Override
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -503,8 +499,7 @@ public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFi
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -519,8 +514,7 @@ public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFi
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -536,8 +530,7 @@ public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFi
|
|||
@Override
|
||||
public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -554,8 +547,7 @@ public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFi
|
|||
@Override
|
||||
public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
|
|
@ -385,8 +385,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -401,8 +400,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -419,8 +417,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
|
|||
@Override
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -437,8 +434,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
|
|||
@Override
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -453,8 +449,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public double walkInColumnOrder(final RealMatrixChangingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInColumnOrder(final RealMatrixChangingVisitor visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -469,8 +464,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public double walkInColumnOrder(final RealMatrixPreservingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInColumnOrder(final RealMatrixPreservingVisitor visitor) {
|
||||
final int rows = getRowDimension();
|
||||
final int columns = getColumnDimension();
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
|
@ -486,8 +480,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
|
|||
@Override
|
||||
public double walkInColumnOrder(final RealMatrixChangingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
@ -504,8 +497,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
|
|||
@Override
|
||||
public double walkInColumnOrder(final RealMatrixPreservingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(getRowDimension(), getColumnDimension(),
|
||||
startRow, endRow, startColumn, endColumn);
|
||||
|
|
|
@ -1320,8 +1320,7 @@ public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMa
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor) {
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
for (int iBlock = 0; iBlock < blockRows; ++iBlock) {
|
||||
final int pStart = iBlock * BLOCK_SIZE;
|
||||
|
@ -1345,8 +1344,7 @@ public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMa
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor) {
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
for (int iBlock = 0; iBlock < blockRows; ++iBlock) {
|
||||
final int pStart = iBlock * BLOCK_SIZE;
|
||||
|
@ -1371,9 +1369,8 @@ public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMa
|
|||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(rows, columns, startRow, endRow, startColumn, endColumn);
|
||||
for (int iBlock = startRow / BLOCK_SIZE; iBlock < 1 + endRow / BLOCK_SIZE; ++iBlock) {
|
||||
|
@ -1401,9 +1398,8 @@ public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMa
|
|||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(rows, columns, startRow, endRow, startColumn, endColumn);
|
||||
for (int iBlock = startRow / BLOCK_SIZE; iBlock < 1 + endRow / BLOCK_SIZE; ++iBlock) {
|
||||
|
@ -1430,8 +1426,7 @@ public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMa
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInOptimizedOrder(final FieldMatrixChangingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInOptimizedOrder(final FieldMatrixChangingVisitor<T> visitor) {
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
int blockIndex = 0;
|
||||
for (int iBlock = 0; iBlock < blockRows; ++iBlock) {
|
||||
|
@ -1456,8 +1451,7 @@ public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMa
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public T walkInOptimizedOrder(final FieldMatrixPreservingVisitor<T> visitor)
|
||||
throws MatrixVisitorException {
|
||||
public T walkInOptimizedOrder(final FieldMatrixPreservingVisitor<T> visitor) {
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
int blockIndex = 0;
|
||||
for (int iBlock = 0; iBlock < blockRows; ++iBlock) {
|
||||
|
@ -1484,8 +1478,7 @@ public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMa
|
|||
@Override
|
||||
public T walkInOptimizedOrder(final FieldMatrixChangingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(rows, columns, startRow, endRow, startColumn, endColumn);
|
||||
for (int iBlock = startRow / BLOCK_SIZE; iBlock < 1 + endRow / BLOCK_SIZE; ++iBlock) {
|
||||
|
@ -1514,8 +1507,7 @@ public class BlockFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMa
|
|||
@Override
|
||||
public T walkInOptimizedOrder(final FieldMatrixPreservingVisitor<T> visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(rows, columns, startRow, endRow, startColumn, endColumn);
|
||||
for (int iBlock = startRow / BLOCK_SIZE; iBlock < 1 + endRow / BLOCK_SIZE; ++iBlock) {
|
||||
|
|
|
@ -1304,8 +1304,7 @@ public class BlockRealMatrix extends AbstractRealMatrix implements Serializable
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor) {
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
for (int iBlock = 0; iBlock < blockRows; ++iBlock) {
|
||||
final int pStart = iBlock * BLOCK_SIZE;
|
||||
|
@ -1329,8 +1328,7 @@ public class BlockRealMatrix extends AbstractRealMatrix implements Serializable
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor) {
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
for (int iBlock = 0; iBlock < blockRows; ++iBlock) {
|
||||
final int pStart = iBlock * BLOCK_SIZE;
|
||||
|
@ -1356,8 +1354,7 @@ public class BlockRealMatrix extends AbstractRealMatrix implements Serializable
|
|||
@Override
|
||||
public double walkInRowOrder(final RealMatrixChangingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(rows, columns, startRow, endRow, startColumn, endColumn);
|
||||
for (int iBlock = startRow / BLOCK_SIZE; iBlock < 1 + endRow / BLOCK_SIZE; ++iBlock) {
|
||||
|
@ -1386,8 +1383,7 @@ public class BlockRealMatrix extends AbstractRealMatrix implements Serializable
|
|||
@Override
|
||||
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(rows, columns, startRow, endRow, startColumn, endColumn);
|
||||
for (int iBlock = startRow / BLOCK_SIZE; iBlock < 1 + endRow / BLOCK_SIZE; ++iBlock) {
|
||||
|
@ -1414,8 +1410,7 @@ public class BlockRealMatrix extends AbstractRealMatrix implements Serializable
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public double walkInOptimizedOrder(final RealMatrixChangingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInOptimizedOrder(final RealMatrixChangingVisitor visitor) {
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
int blockIndex = 0;
|
||||
for (int iBlock = 0; iBlock < blockRows; ++iBlock) {
|
||||
|
@ -1440,8 +1435,7 @@ public class BlockRealMatrix extends AbstractRealMatrix implements Serializable
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public double walkInOptimizedOrder(final RealMatrixPreservingVisitor visitor)
|
||||
throws MatrixVisitorException {
|
||||
public double walkInOptimizedOrder(final RealMatrixPreservingVisitor visitor) {
|
||||
visitor.start(rows, columns, 0, rows - 1, 0, columns - 1);
|
||||
int blockIndex = 0;
|
||||
for (int iBlock = 0; iBlock < blockRows; ++iBlock) {
|
||||
|
@ -1468,8 +1462,7 @@ public class BlockRealMatrix extends AbstractRealMatrix implements Serializable
|
|||
@Override
|
||||
public double walkInOptimizedOrder(final RealMatrixChangingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(rows, columns, startRow, endRow, startColumn, endColumn);
|
||||
for (int iBlock = startRow / BLOCK_SIZE; iBlock < 1 + endRow / BLOCK_SIZE; ++iBlock) {
|
||||
|
@ -1498,8 +1491,7 @@ public class BlockRealMatrix extends AbstractRealMatrix implements Serializable
|
|||
@Override
|
||||
public double walkInOptimizedOrder(final RealMatrixPreservingVisitor visitor,
|
||||
final int startRow, final int endRow,
|
||||
final int startColumn, final int endColumn)
|
||||
throws MatrixVisitorException {
|
||||
final int startColumn, final int endColumn) {
|
||||
MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
|
||||
visitor.start(rows, columns, startRow, endRow, startColumn, endColumn);
|
||||
for (int iBlock = startRow / BLOCK_SIZE; iBlock < 1 + endRow / BLOCK_SIZE; ++iBlock) {
|
||||
|
|
|
@ -49,8 +49,7 @@ public class DefaultFieldMatrixChangingVisitor<T extends FieldElement<T>>
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T visit(int row, int column, T value)
|
||||
throws MatrixVisitorException {
|
||||
public T visit(int row, int column, T value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,9 +49,7 @@ public class DefaultFieldMatrixPreservingVisitor<T extends FieldElement<T>>
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public void visit(int row, int column, T value)
|
||||
throws MatrixVisitorException {
|
||||
}
|
||||
public void visit(int row, int column, T value) {}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public T end() {
|
||||
|
|
|
@ -35,8 +35,7 @@ public class DefaultRealMatrixChangingVisitor implements RealMatrixChangingVisit
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double visit(int row, int column, double value)
|
||||
throws MatrixVisitorException {
|
||||
public double visit(int row, int column, double value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,9 +35,7 @@ public class DefaultRealMatrixPreservingVisitor implements RealMatrixPreservingV
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public void visit(int row, int column, double value)
|
||||
throws MatrixVisitorException {
|
||||
}
|
||||
public void visit(int row, int column, double value) {}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double end() {
|
||||
|
|
|
@ -471,7 +471,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* of a row from left to right before going to the leftmost element
|
||||
* of the next row.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(FieldMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
|
||||
* @see #walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
|
||||
|
@ -494,7 +495,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* of a row from left to right before going to the leftmost element
|
||||
* of the next row.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
|
||||
* @see #walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
|
||||
|
@ -521,7 +523,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException
|
||||
* if the indices are not valid.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
|
@ -551,7 +554,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException
|
||||
* if the indices are not valid.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
|
@ -577,7 +581,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* of a column from top to bottom before going to the topmost element
|
||||
* of the next column.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
|
||||
|
@ -600,7 +605,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* of a column from top to bottom before going to the topmost element
|
||||
* of the next column.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
|
||||
|
@ -627,7 +633,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException
|
||||
* if the indices are not valid.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
|
@ -657,7 +664,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException
|
||||
* if the indices are not valid.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
|
@ -682,7 +690,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* <p>The fastest walking order depends on the exact matrix class. It may be
|
||||
* different from traditional row or column orders.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
|
||||
|
@ -704,7 +713,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* <p>The fastest walking order depends on the exact matrix class. It may be
|
||||
* different from traditional row or column orders.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
|
||||
|
@ -730,7 +740,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index (inclusive)
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException
|
||||
* if the indices are not valid.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
|
@ -759,7 +770,8 @@ public interface FieldMatrix<T extends FieldElement<T>> extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index (inclusive)
|
||||
* @exception MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException
|
||||
* if the indices are not valid.
|
||||
* @see #walkInRowOrder(FieldMatrixChangingVisitor)
|
||||
|
|
|
@ -47,10 +47,10 @@ public interface FieldMatrixChangingVisitor<T extends FieldElement<?>> {
|
|||
* @param column column index of the entry
|
||||
* @param value current value of the entry
|
||||
* @return the new value to be set for the entry
|
||||
* @throws MatrixVisitorException if something wrong occurs
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
*/
|
||||
T visit(int row, int column, T value)
|
||||
throws MatrixVisitorException;
|
||||
T visit(int row, int column, T value);
|
||||
|
||||
/**
|
||||
* End visiting a matrix.
|
||||
|
@ -58,5 +58,4 @@ public interface FieldMatrixChangingVisitor<T extends FieldElement<?>> {
|
|||
* @return the value that the <code>walkInXxxOrder</code> must return
|
||||
*/
|
||||
T end();
|
||||
|
||||
}
|
||||
|
|
|
@ -46,10 +46,10 @@ public interface FieldMatrixPreservingVisitor<T extends FieldElement<?>> {
|
|||
* @param row row index of the entry
|
||||
* @param column column index of the entry
|
||||
* @param value current value of the entry
|
||||
* @throws MatrixVisitorException if something wrong occurs
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
*/
|
||||
void visit(int row, int column, T value)
|
||||
throws MatrixVisitorException;
|
||||
void visit(int row, int column, T value);
|
||||
|
||||
/**
|
||||
* End visiting a matrix.
|
||||
|
@ -57,5 +57,4 @@ public interface FieldMatrixPreservingVisitor<T extends FieldElement<?>> {
|
|||
* @return the value that the <code>walkInXxxOrder</code> must return
|
||||
*/
|
||||
T end();
|
||||
|
||||
}
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.commons.math.linear;
|
||||
|
||||
import org.apache.commons.math.MathRuntimeException;
|
||||
import org.apache.commons.math.exception.util.Localizable;
|
||||
|
||||
/**
|
||||
* Thrown when a visitor encounters an error while processing a matrix entry.
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public class MatrixVisitorException extends MathRuntimeException {
|
||||
|
||||
/** Serializable version identifier */
|
||||
private static final long serialVersionUID = 3814333035048617048L;
|
||||
|
||||
/**
|
||||
* Constructs a new instance with specified formatted detail message.
|
||||
* @param pattern format specifier
|
||||
* @param arguments format arguments
|
||||
* @deprecated as of 2.2 replaced by {@link #MatrixVisitorException(Localizable, Object...)}
|
||||
*/
|
||||
@Deprecated
|
||||
public MatrixVisitorException(final String pattern, final Object[] arguments) {
|
||||
super(pattern, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance with specified formatted detail message.
|
||||
* @param pattern format specifier
|
||||
* @param arguments format arguments
|
||||
* @since 2.2
|
||||
*/
|
||||
public MatrixVisitorException(final Localizable pattern, final Object[] arguments) {
|
||||
super(pattern, arguments);
|
||||
}
|
||||
|
||||
}
|
|
@ -476,7 +476,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* of a row from left to right before going to the leftmost element
|
||||
* of the next row.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(RealMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int)
|
||||
* @see #walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int)
|
||||
|
@ -499,7 +500,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* of a row from left to right before going to the leftmost element
|
||||
* of the next row.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int)
|
||||
* @see #walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int)
|
||||
|
@ -526,7 +528,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException if
|
||||
* the indices are not valid.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
|
@ -556,7 +559,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException if
|
||||
* the indices are not valid.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
|
@ -582,7 +586,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* of a column from top to bottom before going to the topmost element
|
||||
* of the next column.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int)
|
||||
|
@ -605,7 +610,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* of a column from top to bottom before going to the topmost element
|
||||
* of the next column.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int)
|
||||
|
@ -632,7 +638,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException if
|
||||
* the indices are not valid.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
|
@ -662,7 +669,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException if
|
||||
* the indices are not valid.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
|
@ -687,7 +695,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* <p>The fastest walking order depends on the exact matrix class. It may be
|
||||
* different from traditional row or column orders.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int)
|
||||
|
@ -709,7 +718,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* <p>The fastest walking order depends on the exact matrix class. It may be
|
||||
* different from traditional row or column orders.</p>
|
||||
* @param visitor visitor used to process all matrix entries
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixPreservingVisitor)
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int)
|
||||
|
@ -735,7 +745,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index (inclusive)
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException if
|
||||
* the indices are not valid.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
|
@ -764,7 +775,8 @@ public interface RealMatrix extends AnyMatrix {
|
|||
* @param endRow Final row index (inclusive)
|
||||
* @param startColumn Initial column index
|
||||
* @param endColumn Final column index (inclusive)
|
||||
* @throws MatrixVisitorException if the visitor cannot process an entry
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
* @throws org.apache.commons.math.exception.OutOfRangeException if the
|
||||
* indices are not valid.
|
||||
* @see #walkInRowOrder(RealMatrixChangingVisitor)
|
||||
|
|
|
@ -45,10 +45,10 @@ public interface RealMatrixChangingVisitor {
|
|||
* @param column column index of the entry
|
||||
* @param value current value of the entry
|
||||
* @return the new value to be set for the entry
|
||||
* @throws MatrixVisitorException if something wrong occurs
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
*/
|
||||
double visit(int row, int column, double value)
|
||||
throws MatrixVisitorException;
|
||||
double visit(int row, int column, double value);
|
||||
|
||||
/**
|
||||
* End visiting a matrix.
|
||||
|
@ -56,5 +56,4 @@ public interface RealMatrixChangingVisitor {
|
|||
* @return the value that the <code>walkInXxxOrder</code> must return
|
||||
*/
|
||||
double end();
|
||||
|
||||
}
|
||||
|
|
|
@ -44,10 +44,10 @@ public interface RealMatrixPreservingVisitor {
|
|||
* @param row row index of the entry
|
||||
* @param column column index of the entry
|
||||
* @param value current value of the entry
|
||||
* @throws MatrixVisitorException if something wrong occurs
|
||||
* @throws org.apache.commons.math.exception.MathUserException if the visitor
|
||||
* cannot process an entry.
|
||||
*/
|
||||
void visit(int row, int column, double value)
|
||||
throws MatrixVisitorException;
|
||||
void visit(int row, int column, double value);
|
||||
|
||||
/**
|
||||
* End visiting a matrix.
|
||||
|
@ -55,5 +55,4 @@ public interface RealMatrixPreservingVisitor {
|
|||
* @return the value that the <code>walkInXxxOrder</code> must return
|
||||
*/
|
||||
double end();
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.commons.math.ode.nonstiff;
|
|||
import java.util.Arrays;
|
||||
|
||||
import org.apache.commons.math.linear.Array2DRowRealMatrix;
|
||||
import org.apache.commons.math.linear.MatrixVisitorException;
|
||||
import org.apache.commons.math.linear.RealMatrixPreservingVisitor;
|
||||
import org.apache.commons.math.ode.DerivativeException;
|
||||
import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
|
||||
|
@ -413,8 +412,7 @@ public class AdamsMoultonIntegrator extends AdamsIntegrator {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public void visit(int row, int column, double value)
|
||||
throws MatrixVisitorException {
|
||||
public void visit(int row, int column, double value) {
|
||||
if ((row & 0x1) == 0) {
|
||||
after[column] -= value;
|
||||
} else {
|
||||
|
|
|
@ -240,8 +240,7 @@ public class QRDecompositionImplTest extends TestCase {
|
|||
RealMatrix m = MatrixUtils.createRealMatrix(rows, columns);
|
||||
m.walkInOptimizedOrder(new DefaultRealMatrixChangingVisitor(){
|
||||
@Override
|
||||
public double visit(int row, int column, double value)
|
||||
throws MatrixVisitorException {
|
||||
public double visit(int row, int column, double value) {
|
||||
return 2.0 * r.nextDouble() - 1.0;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -203,8 +203,7 @@ public class QRSolverTest extends TestCase {
|
|||
RealMatrix m = MatrixUtils.createRealMatrix(rows, columns);
|
||||
m.walkInOptimizedOrder(new DefaultRealMatrixChangingVisitor(){
|
||||
@Override
|
||||
public double visit(int row, int column, double value)
|
||||
throws MatrixVisitorException {
|
||||
public double visit(int row, int column, double value) {
|
||||
return 2.0 * r.nextDouble() - 1.0;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -21,7 +21,6 @@ import static org.junit.Assert.assertEquals;
|
|||
import org.apache.commons.math.TestUtils;
|
||||
import org.apache.commons.math.linear.DefaultRealMatrixChangingVisitor;
|
||||
import org.apache.commons.math.linear.MatrixUtils;
|
||||
import org.apache.commons.math.linear.MatrixVisitorException;
|
||||
import org.apache.commons.math.linear.RealMatrix;
|
||||
import org.apache.commons.math.linear.Array2DRowRealMatrix;
|
||||
import org.apache.commons.math.linear.RealVector;
|
||||
|
@ -88,8 +87,7 @@ public class OLSMultipleLinearRegressionTest extends MultipleLinearRegressionAbs
|
|||
RealMatrix referenceVariance = new Array2DRowRealMatrix(s.length, s.length);
|
||||
referenceVariance.walkInOptimizedOrder(new DefaultRealMatrixChangingVisitor() {
|
||||
@Override
|
||||
public double visit(int row, int column, double value)
|
||||
throws MatrixVisitorException {
|
||||
public double visit(int row, int column, double value) {
|
||||
if (row == 0) {
|
||||
return s[column];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue