Fix Clirr error wrt return type of DiagonalMatrix#copy.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1456179 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-03-13 22:02:07 +00:00
parent 7b9797f4a2
commit 8e14f37169
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ public class DiagonalMatrix extends AbstractRealMatrix
/** {@inheritDoc} */
@Override
public DiagonalMatrix copy() {
public RealMatrix copy() {
return new DiagonalMatrix(data);
}

View File

@ -97,7 +97,7 @@ public class DiagonalMatrixTest {
public void testCopy() {
final double[] d = { -1.2, 3.4, 5 };
final DiagonalMatrix m = new DiagonalMatrix(d, false);
final DiagonalMatrix p = m.copy();
final DiagonalMatrix p = (DiagonalMatrix) m.copy();
for (int i = 0; i < m.getRowDimension(); ++i) {
Assert.assertEquals(m.getEntry(i, i), p.getEntry(i, i), 1.0e-20);
}