Exemplo n.º 1
0
  @Test
  public void testIsTriangularStrictAnyShouldSuccess() throws Exception {
    Matrix a =
        new Matrix(
            new double[][] {
              {0, 0, 0},
              {1, 0, 0},
              {1, 2, 0}
            });
    assertEquals(true, a.isTriangular(Matrix.TriangleType.ANY, true));

    Matrix b =
        new Matrix(
            new double[][] {
              {0, 0, 0},
              {0, 0, 0},
              {0, 0, 0}
            });
    assertEquals(true, b.isTriangular(Matrix.TriangleType.INFERIOR, true));
  }
Exemplo n.º 2
0
 @Test
 public void testIsTriangularAnyShouldSuccess() throws Exception {
   Matrix a =
       new Matrix(
           new double[][] {
             {2, 0, 0},
             {1, 1, 0},
             {1, 2, 1}
           });
   assertEquals(true, a.isTriangular(Matrix.TriangleType.ANY, false));
 }