예제 #1
0
  @Test
  public void testSumArraysTableaux() {

    double bits[] = {-1f, 2f, 0f};
    double bitsT1[] = {1f, -2f, 0f};
    double bitsResult[] = {0f, 0f, 0f};
    double resultat[] = ArrayTool.sumArrays(bits, bitsT1);

    assertArrayEquals(resultat, bitsResult, 0.0f);
  }
예제 #2
0
  @Test
  public void testSumArraysInformations() {

    Double bits[] = {-1.0, 2.0, 0.0};
    Information<Double> informationInitiale = new Information<>(bits);
    Double bitsT1[] = {1.0, -2.0, 0.0};
    Information<Double> informationT1 = new Information<>(bitsT1);
    Double bitsResult[] = {0.0, 0.0, 0.0};
    Information<Double> informationResult = new Information<>(bitsResult);

    Information<Double> informationTotale = ArrayTool.sumArrays(informationInitiale, informationT1);

    assertEquals(informationResult, informationTotale);
  }