| public void testRankWithThresholdUsingResult() {
// Test 1
Matrix A = Matrix.create(new double[][] {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}});
ISVDResult result = SVD.decompose(A);
assertEquals(Rank.compute(result, 10e-20),3);
// Test 2
Matrix B = Matrix.create(new double[][] {{1, 2, 3, 4},
{4, 5, 6, 7},
{7, 8, 9, 10}});
|