BaseSpatialWindow extends BaseFunction<T> { public static int innerUpperExtent( int windowLength , int period , int padding , int inputLength ) { return (inputLength+padding-windowLength)/period; } BaseSpatialWindow(ConfigSpatial config, P padding); @Override void _initialize(); static int innerLowerExtent(int period, int padding); static int innerUpperExtent( int windowLength , int period , int padding , int inputLength ); P getPadding();  }
@Test public void innerUpperExtent() { assertEquals(9,BaseSpatialWindow.innerUpperExtent(1,1,0,10)); assertEquals(4,BaseSpatialWindow.innerUpperExtent(1,2,0,10)); assertEquals(8,BaseSpatialWindow.innerUpperExtent(2,1,0,10)); assertEquals(7,BaseSpatialWindow.innerUpperExtent(3,1,0,10)); assertEquals(3,BaseSpatialWindow.innerUpperExtent(1,3,0,10)); assertEquals(2,BaseSpatialWindow.innerUpperExtent(2,3,0,10)); assertEquals(11,BaseSpatialWindow.innerUpperExtent(1,1,2,10)); assertEquals(5 ,BaseSpatialWindow.innerUpperExtent(1,2,2,10)); assertEquals(10,BaseSpatialWindow.innerUpperExtent(2,1,2,10)); assertEquals(9 ,BaseSpatialWindow.innerUpperExtent(3,1,2,10)); assertEquals(3 ,BaseSpatialWindow.innerUpperExtent(1,3,2,10)); assertEquals(3 ,BaseSpatialWindow.innerUpperExtent(2,3,2,10)); assertEquals(3 ,BaseSpatialWindow.innerUpperExtent(2,3,1,10)); assertEquals(2 ,BaseSpatialWindow.innerUpperExtent(3,3,1,10)); assertEquals(3 ,BaseSpatialWindow.innerUpperExtent(2,3,2,10)); }