MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / testSwapRows

Method testSwapRows

JSAT/test/jsat/linear/SparseMatrixTest.java:1029–1050  ·  view source on GitHub ↗

Test of swapRows method, of class SparseMatrix.

()

Source from the content-addressed store, hash-verified

1027 * Test of swapRows method, of class SparseMatrix.
1028 */
1029 @Test
1030 public void testSwapRows()
1031 {
1032 System.out.println("swapRows");
1033 int[] r = new int[]
1034 {
1035 6, 3, 4, 3, 2, 1, 6, 5
1036 };
1037
1038 int[] c = new int[]
1039 {
1040 1, 2, 2, 3, 4, 5, 5, 6
1041 };
1042
1043 double[] v = new double[]
1044 {
1045 1, 2, 1, -7, 3, 3, 4, 1
1046 };
1047
1048 A.swapRows(0, 5);
1049 checkAgainstRCV(A, v, r, c);
1050 }
1051
1052 /**
1053 * Test of zeroOut method, of class SparseMatrix.

Callers

nothing calls this directly

Calls 2

checkAgainstRCVMethod · 0.95
swapRowsMethod · 0.45

Tested by

no test coverage detected