@Test
public void testDiagonal() {

    Matrix D = Matrix.square(20);
    D.diagonal().randomize();
    assertTrue(D.isDiagonal());
    assertTrue(D.isDiagonal(.001));
    D.set(18, 19, .001);
    assertTrue(!D.isDiagonal());
    assertTrue(D.isDiagonal(.001));
    assertTrue(!D.isDiagonal(.000999));
}