### Question:
WeightWindows { public static double[] inverseHamming(final double[] hamming) { double[] invertHamming = new double[hamming.length]; for (int i = 0; i < hamming.length; i++) { if (hamming[i] != 0) { invertHamming[i] = 1. / hamming[i]; } } return invertHamming; }  static DoubleMatrix rect(final DoubleMatrix x); static double[] rect(final double[] x); static double[] hamming(final int n); static double[] hamming(final double[] fr, final double br, final double fs, final double alpha); static DoubleMatrix hamming(final DoubleMatrix fr, final double br, final double fs, final double alpha); static double[] inverseHamming(final double[] hamming); static double[] inverseHamming(final double[] fr, final double br, final double fs, final double alpha); static DoubleMatrix inverseHamming(final DoubleMatrix fr, final double br, final double fs, final double alpha);  }### Answer:
@Test public void testInvertHammingArray() throws Exception { double[] inverseHamming_ACTUAL = WeightWindows.inverseHamming(inputAxisHamming, Br, Fs, ALPHA); Assert.assertArrayEquals(inverseHamming_EXPECTED,inverseHamming_ACTUAL, DELTA); }
@Test public void testInvertHammingDoubleMatrix() throws Exception { DoubleMatrix inverseHamming_ACTUAL = WeightWindows.inverseHamming(new DoubleMatrix(inputAxisHamming), Br, Fs, ALPHA); Assert.assertEquals(new DoubleMatrix(inverseHamming_EXPECTED),inverseHamming_ACTUAL); }