fixed wrong matrix type in test ...
sorry git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731245 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
38d8f7434f
commit
effa1be80d
|
@ -477,7 +477,7 @@ public final class DenseRealMatrixTest extends TestCase {
|
||||||
|
|
||||||
// test submatrix accessors
|
// test submatrix accessors
|
||||||
public void testGetSubMatrix() {
|
public void testGetSubMatrix() {
|
||||||
RealMatrix m = new RealMatrixImpl(subTestData);
|
RealMatrix m = new DenseRealMatrix(subTestData);
|
||||||
checkGetSubMatrix(m, subRows23Cols00, 2 , 3 , 0, 0, false);
|
checkGetSubMatrix(m, subRows23Cols00, 2 , 3 , 0, 0, false);
|
||||||
checkGetSubMatrix(m, subRows00Cols33, 0 , 0 , 3, 3, false);
|
checkGetSubMatrix(m, subRows00Cols33, 0 , 0 , 3, 3, false);
|
||||||
checkGetSubMatrix(m, subRows01Cols23, 0 , 1 , 2, 3, false);
|
checkGetSubMatrix(m, subRows01Cols23, 0 , 1 , 2, 3, false);
|
||||||
|
@ -500,7 +500,7 @@ public final class DenseRealMatrixTest extends TestCase {
|
||||||
boolean mustFail) {
|
boolean mustFail) {
|
||||||
try {
|
try {
|
||||||
RealMatrix sub = m.getSubMatrix(startRow, endRow, startColumn, endColumn);
|
RealMatrix sub = m.getSubMatrix(startRow, endRow, startColumn, endColumn);
|
||||||
assertEquals(new RealMatrixImpl(reference), sub);
|
assertEquals(new DenseRealMatrix(reference), sub);
|
||||||
if (mustFail) {
|
if (mustFail) {
|
||||||
fail("Expecting MatrixIndexException");
|
fail("Expecting MatrixIndexException");
|
||||||
}
|
}
|
||||||
|
@ -516,7 +516,7 @@ public final class DenseRealMatrixTest extends TestCase {
|
||||||
boolean mustFail) {
|
boolean mustFail) {
|
||||||
try {
|
try {
|
||||||
RealMatrix sub = m.getSubMatrix(selectedRows, selectedColumns);
|
RealMatrix sub = m.getSubMatrix(selectedRows, selectedColumns);
|
||||||
assertEquals(new RealMatrixImpl(reference), sub);
|
assertEquals(new DenseRealMatrix(reference), sub);
|
||||||
if (mustFail) {
|
if (mustFail) {
|
||||||
fail("Expecting MatrixIndexException");
|
fail("Expecting MatrixIndexException");
|
||||||
}
|
}
|
||||||
|
@ -547,7 +547,7 @@ public final class DenseRealMatrixTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCopySubMatrix() {
|
public void testCopySubMatrix() {
|
||||||
RealMatrix m = new RealMatrixImpl(subTestData);
|
RealMatrix m = new DenseRealMatrix(subTestData);
|
||||||
checkCopy(m, subRows23Cols00, 2 , 3 , 0, 0, false);
|
checkCopy(m, subRows23Cols00, 2 , 3 , 0, 0, false);
|
||||||
checkCopy(m, subRows00Cols33, 0 , 0 , 3, 3, false);
|
checkCopy(m, subRows00Cols33, 0 , 0 , 3, 3, false);
|
||||||
checkCopy(m, subRows01Cols23, 0 , 1 , 2, 3, false);
|
checkCopy(m, subRows01Cols23, 0 , 1 , 2, 3, false);
|
||||||
|
@ -574,7 +574,7 @@ public final class DenseRealMatrixTest extends TestCase {
|
||||||
new double[1][1] :
|
new double[1][1] :
|
||||||
new double[reference.length][reference[0].length];
|
new double[reference.length][reference[0].length];
|
||||||
m.copySubMatrix(startRow, endRow, startColumn, endColumn, sub);
|
m.copySubMatrix(startRow, endRow, startColumn, endColumn, sub);
|
||||||
assertEquals(new RealMatrixImpl(reference), new RealMatrixImpl(sub));
|
assertEquals(new DenseRealMatrix(reference), new DenseRealMatrix(sub));
|
||||||
if (mustFail) {
|
if (mustFail) {
|
||||||
fail("Expecting MatrixIndexException");
|
fail("Expecting MatrixIndexException");
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@ public final class DenseRealMatrixTest extends TestCase {
|
||||||
new double[1][1] :
|
new double[1][1] :
|
||||||
new double[reference.length][reference[0].length];
|
new double[reference.length][reference[0].length];
|
||||||
m.copySubMatrix(selectedRows, selectedColumns, sub);
|
m.copySubMatrix(selectedRows, selectedColumns, sub);
|
||||||
assertEquals(new RealMatrixImpl(reference), new RealMatrixImpl(sub));
|
assertEquals(new DenseRealMatrix(reference), new DenseRealMatrix(sub));
|
||||||
if (mustFail) {
|
if (mustFail) {
|
||||||
fail("Expecting MatrixIndexException");
|
fail("Expecting MatrixIndexException");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue