Changing DenseRealMatrix to return a specific type, instead of interface type.

I beleive the consensus is to leave RealMatrixImpl and RealVectorImpl alone for now (since they were in 1.2), so that's what I'm doing.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@776943 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
William Barker 2009-05-21 03:24:43 +00:00
parent 7f7915b6f9
commit 1ed2b9afc5
1 changed files with 10 additions and 10 deletions

View File

@ -281,14 +281,14 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix createMatrix(final int rowDimension, final int columnDimension) public DenseRealMatrix createMatrix(final int rowDimension, final int columnDimension)
throws IllegalArgumentException { throws IllegalArgumentException {
return new DenseRealMatrix(rowDimension, columnDimension); return new DenseRealMatrix(rowDimension, columnDimension);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix copy() { public DenseRealMatrix copy() {
// create an empty matrix // create an empty matrix
DenseRealMatrix copied = new DenseRealMatrix(rows, columns); DenseRealMatrix copied = new DenseRealMatrix(rows, columns);
@ -304,7 +304,7 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix add(final RealMatrix m) public DenseRealMatrix add(final RealMatrix m)
throws IllegalArgumentException { throws IllegalArgumentException {
try { try {
return add((DenseRealMatrix) m); return add((DenseRealMatrix) m);
@ -375,7 +375,7 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix subtract(final RealMatrix m) public DenseRealMatrix subtract(final RealMatrix m)
throws IllegalArgumentException { throws IllegalArgumentException {
try { try {
return subtract((DenseRealMatrix) m); return subtract((DenseRealMatrix) m);
@ -446,7 +446,7 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix scalarAdd(final double d) public DenseRealMatrix scalarAdd(final double d)
throws IllegalArgumentException { throws IllegalArgumentException {
final DenseRealMatrix out = new DenseRealMatrix(rows, columns); final DenseRealMatrix out = new DenseRealMatrix(rows, columns);
@ -486,7 +486,7 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix multiply(final RealMatrix m) public DenseRealMatrix multiply(final RealMatrix m)
throws IllegalArgumentException { throws IllegalArgumentException {
try { try {
return multiply((DenseRealMatrix) m); return multiply((DenseRealMatrix) m);
@ -681,7 +681,7 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix getSubMatrix(final int startRow, final int endRow, public DenseRealMatrix getSubMatrix(final int startRow, final int endRow,
final int startColumn, final int endColumn) final int startColumn, final int endColumn)
throws MatrixIndexException { throws MatrixIndexException {
@ -858,7 +858,7 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix getRowMatrix(final int row) public DenseRealMatrix getRowMatrix(final int row)
throws MatrixIndexException { throws MatrixIndexException {
MatrixUtils.checkRowIndex(this, row); MatrixUtils.checkRowIndex(this, row);
@ -949,7 +949,7 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix getColumnMatrix(final int column) public DenseRealMatrix getColumnMatrix(final int column)
throws MatrixIndexException { throws MatrixIndexException {
MatrixUtils.checkColumnIndex(this, column); MatrixUtils.checkColumnIndex(this, column);
@ -1276,7 +1276,7 @@ public class DenseRealMatrix extends AbstractRealMatrix implements Serializable
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public RealMatrix transpose() { public DenseRealMatrix transpose() {
final int nRows = getRowDimension(); final int nRows = getRowDimension();
final int nCols = getColumnDimension(); final int nCols = getColumnDimension();