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:
parent
7b9797f4a2
commit
8e14f37169
|
@ -103,7 +103,7 @@ public class DiagonalMatrix extends AbstractRealMatrix
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public DiagonalMatrix copy() {
|
public RealMatrix copy() {
|
||||||
return new DiagonalMatrix(data);
|
return new DiagonalMatrix(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class DiagonalMatrixTest {
|
||||||
public void testCopy() {
|
public void testCopy() {
|
||||||
final double[] d = { -1.2, 3.4, 5 };
|
final double[] d = { -1.2, 3.4, 5 };
|
||||||
final DiagonalMatrix m = new DiagonalMatrix(d, false);
|
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) {
|
for (int i = 0; i < m.getRowDimension(); ++i) {
|
||||||
Assert.assertEquals(m.getEntry(i, i), p.getEntry(i, i), 1.0e-20);
|
Assert.assertEquals(m.getEntry(i, i), p.getEntry(i, i), 1.0e-20);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue