test_class.file: jtstoolkit/src/test/java/ec/satoolkit/x11/TrendCycleFilterFactoryTest.java
test_class.identifier: TrendCycleFilterFactoryTest
test_case.body: @Test
      public void testMakeHendersonFilter() {
          for (int i = 1; i < 100; i += 2) {
              SymmetricFilter filter = TrendCycleFilterFactory.makeHendersonFilter(i);
              DataBlock w = new DataBlock(filter.getWeights());
              assertTrue(Math.abs(w.sum() - 1) < 1e-9);
          }
      }
test_case.class_method_signature: TrendCycleFilterFactoryTest.testMakeHendersonFilter()
test_case.full_signature: @Test public void testMakeHendersonFilter()
test_case.identifier: testMakeHendersonFilter
test_case.invocations: makeHendersonFilter getWeights assertTrue abs sum
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMakeHendersonFilter()
focal_class.file: jtstoolkit/src/main/java/ec/satoolkit/x11/TrendCycleFilterFactory.java
focal_class.identifier: TrendCycleFilterFactory
focal_class.class_method_signature: TrendCycleFilterFactory.defaultHendersonFilterForFrequency(
  	    final int frequency)
focal_class.full_signature: public static SymmetricFilter defaultHendersonFilterForFrequency(
  	    final int frequency)
focal_class.identifier: defaultHendersonFilterForFrequency
focal_class.modifiers: public static
focal_class.parameters: (
  	    final int frequency)
focal_class.return: SymmetricFilter
focal_class.signature: SymmetricFilter defaultHendersonFilterForFrequency(
  	    final int frequency)
focal_class.class_method_signature: TrendCycleFilterFactory.makeHendersonFilter(int length)
focal_class.full_signature: public static SymmetricFilter makeHendersonFilter(int length)
focal_class.identifier: makeHendersonFilter
focal_class.modifiers: public static
focal_class.parameters: (int length)
focal_class.return: SymmetricFilter
focal_class.signature: SymmetricFilter makeHendersonFilter(int length)
focal_class.class_method_signature: TrendCycleFilterFactory.makeTrendFilter(final int frequency)
focal_class.full_signature: public static SymmetricFilter makeTrendFilter(final int frequency)
focal_class.identifier: makeTrendFilter
focal_class.modifiers: public static
focal_class.parameters: (final int frequency)
focal_class.return: SymmetricFilter
focal_class.signature: SymmetricFilter makeTrendFilter(final int frequency)
focal_class.class_method_signature: TrendCycleFilterFactory.TrendCycleFilterFactory()
focal_class.full_signature: private  TrendCycleFilterFactory()
focal_class.identifier: TrendCycleFilterFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  TrendCycleFilterFactory()
focal_method.body: public static SymmetricFilter makeHendersonFilter(int length) {
  	if (length % 2 == 0)
  	    throw new LinearFilterException("Invalid length for Henderson filter. Should be odd");
  	int m = length / 2;
  	double[] c = new double[m + 1];
  	int n = m + 2;
  
  	double n2 = n * n;
  	for (int i = 0; i < m + 1; i++) {
  	    double ii = (i - m) * (i - m);
  	    double up = 315 * (n2 - n * 2 + 1 - (ii));
  	    up *= n2 - ii;
  	    up *= n2 + n * 2 + 1 - ii;
  	    up *= n2 * 3 - 16 - ii * 11;
  	    double down = n * 8;
  	    down *= n2 - 1;
  	    down *= n2 * 4 - 1;
  	    down *= n2 * 4 - 9;
  	    down *= n2 * 4 - 25;
  	    c[m - i] = up / down;
  	}
  	return SymmetricFilter.of(c);
      }
focal_method.class_method_signature: TrendCycleFilterFactory.makeHendersonFilter(int length)
focal_method.full_signature: public static SymmetricFilter makeHendersonFilter(int length)
focal_method.identifier: makeHendersonFilter
focal_method.invocations: of
focal_method.modifiers: public static
focal_method.parameters: (int length)
focal_method.return: SymmetricFilter
focal_method.signature: SymmetricFilter makeHendersonFilter(int length)