test_class.file: brouter-util/src/test/java/btools/util/ReducedMedianFilterTest.java
test_class.identifier: ReducedMedianFilterTest
test_case.body: @Test
    public void reducedMedianFilterTest() throws IOException
    {
      ReducedMedianFilter f = new ReducedMedianFilter( 10 );
      f.reset();
      f.addSample( .2, 10 );
      f.addSample( .2, 10 );
      f.addSample( .2, 10 );
      f.addSample( .2, 15 );
      f.addSample( .2, 20 );
      
      double m = f.calcEdgeReducedMedian( 0.5 );
      Assert.assertTrue( "median1 mismatch m=" + m + " expected 11.5", doubleEquals( m, 11.5 ) );
  
      f.reset();
      f.addSample( .2, 10 );
      f.addSample( .2, 10 );
      f.addSample( .2, 10 );
      f.addSample( .2, 10 );
      f.addSample( .2, 20 );
  
      m = f.calcEdgeReducedMedian( 1. );
      Assert.assertTrue( "median1 mismatch m=" + m + " expected 12", doubleEquals( m, 12. ) );
  
      f.reset();
      f.addSample( .5, -10 );
      f.addSample( .5, 10 );
      m = f.calcEdgeReducedMedian( 0.5 );
      Assert.assertTrue( "median2 mismatch m=" + m + " expected 0", doubleEquals( m, 0. ) );
    }
test_case.class_method_signature: ReducedMedianFilterTest.reducedMedianFilterTest()
test_case.full_signature: @Test public void reducedMedianFilterTest()
test_case.identifier: reducedMedianFilterTest
test_case.invocations: reset addSample addSample addSample addSample addSample calcEdgeReducedMedian assertTrue doubleEquals reset addSample addSample addSample addSample addSample calcEdgeReducedMedian assertTrue doubleEquals reset addSample addSample calcEdgeReducedMedian assertTrue doubleEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void reducedMedianFilterTest()
focal_class.declarator: nsamples
focal_class.modifier: private
focal_class.original_string: private int nsamples;
focal_class.type: int
focal_class.var_name: nsamples
focal_class.declarator: weights
focal_class.modifier: private
focal_class.original_string: private double[] weights;
focal_class.type: double[]
focal_class.var_name: weights
focal_class.declarator: values
focal_class.modifier: private
focal_class.original_string: private int[] values;
focal_class.type: int[]
focal_class.var_name: values
focal_class.file: brouter-util/src/main/java/btools/util/ReducedMedianFilter.java
focal_class.identifier: ReducedMedianFilter
focal_class.class_method_signature: ReducedMedianFilter.ReducedMedianFilter( int size )
focal_class.full_signature: public  ReducedMedianFilter( int size )
focal_class.identifier: ReducedMedianFilter
focal_class.modifiers: public
focal_class.parameters: ( int size )
focal_class.signature:  ReducedMedianFilter( int size )
focal_class.class_method_signature: ReducedMedianFilter.reset()
focal_class.full_signature: public void reset()
focal_class.identifier: reset
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: ReducedMedianFilter.addSample( double weight, int value )
focal_class.full_signature: public void addSample( double weight, int value )
focal_class.identifier: addSample
focal_class.modifiers: public
focal_class.parameters: ( double weight, int value )
focal_class.return: void
focal_class.signature: void addSample( double weight, int value )
focal_class.class_method_signature: ReducedMedianFilter.calcEdgeReducedMedian( double fraction )
focal_class.full_signature: public double calcEdgeReducedMedian( double fraction )
focal_class.identifier: calcEdgeReducedMedian
focal_class.modifiers: public
focal_class.parameters: ( double fraction )
focal_class.return: double
focal_class.signature: double calcEdgeReducedMedian( double fraction )
focal_class.class_method_signature: ReducedMedianFilter.removeEdgeWeight( double excessWeight, boolean high )
focal_class.full_signature: private void removeEdgeWeight( double excessWeight, boolean high )
focal_class.identifier: removeEdgeWeight
focal_class.modifiers: private
focal_class.parameters: ( double excessWeight, boolean high )
focal_class.return: void
focal_class.signature: void removeEdgeWeight( double excessWeight, boolean high )
focal_method.body: public ReducedMedianFilter( int size )
    {
      weights = new double[size];
      values = new int[size];
    }
focal_method.class_method_signature: ReducedMedianFilter.ReducedMedianFilter( int size )
focal_method.full_signature: public  ReducedMedianFilter( int size )
focal_method.identifier: ReducedMedianFilter
focal_method.modifiers: public
focal_method.parameters: ( int size )
focal_method.signature:  ReducedMedianFilter( int size )