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

Method testIsSymmetric_Matrix

JSAT/test/jsat/linear/MatrixTest.java:248–265  ·  view source on GitHub ↗

Test of isSymmetric method, of class Matrix.

()

Source from the content-addressed store, hash-verified

246 * Test of isSymmetric method, of class Matrix.
247 */
248 @Test
249 public void testIsSymmetric_Matrix()
250 {
251 System.out.println("isSymmetric");
252 Matrix A = Matrix.eye(5);
253
254 assertTrue(Matrix.isSymmetric(A));
255
256 A.set(3, 4, 2.0);
257 A.set(4, 3, 2.0);
258
259 assertTrue(Matrix.isSymmetric(A));
260
261 A.set(3, 2, 2);
262
263 assertFalse(Matrix.isSymmetric(A));
264
265 }
266
267 /**
268 * Test of pascal method, of class Matrix.

Callers

nothing calls this directly

Calls 3

eyeMethod · 0.95
isSymmetricMethod · 0.95
setMethod · 0.95

Tested by

no test coverage detected