protected double downsample ( double [ ] data , int start , int end , int size ) { double sum = 0 ; for ( int i = start ; i < end ; i ++ ) { sum += data [ i ] ; } return sum ; }
Perform downsampling on a number of bins .