@Test public void when_skippingIs4_expect_firstNotSkippedOther3Skipped() { FilterOperation sut = new UniformSkippingFilter(4); boolean[] isSkipped = new boolean[8]; for(int i = 0; i < 8; ++i) { isSkipped[i] = sut.isSkipped(null, i, false); } assertFalse(isSkipped[0]); assertTrue(isSkipped[1]); assertTrue(isSkipped[2]); assertTrue(isSkipped[3]); assertFalse(isSkipped[4]); assertTrue(isSkipped[5]); assertTrue(isSkipped[6]); assertTrue(isSkipped[7]); }
@Override public boolean isSkipped(Map<String, Object> channelsData, int currentObservationStep, boolean isFinalObservation) { return !isFinalObservation && (currentObservationStep % skipFrame != 0); }
UniformSkippingFilter implements FilterOperation { @Override public boolean isSkipped(Map<String, Object> channelsData, int currentObservationStep, boolean isFinalObservation) { return !isFinalObservation && (currentObservationStep % skipFrame != 0); } }
UniformSkippingFilter implements FilterOperation { @Override public boolean isSkipped(Map<String, Object> channelsData, int currentObservationStep, boolean isFinalObservation) { return !isFinalObservation && (currentObservationStep % skipFrame != 0); } UniformSkippingFilter(int skipFrame); }
UniformSkippingFilter implements FilterOperation { @Override public boolean isSkipped(Map<String, Object> channelsData, int currentObservationStep, boolean isFinalObservation) { return !isFinalObservation && (currentObservationStep % skipFrame != 0); } UniformSkippingFilter(int skipFrame); @Override boolean isSkipped(Map<String, Object> channelsData, int currentObservationStep, boolean isFinalObservation); }
UniformSkippingFilter implements FilterOperation { @Override public boolean isSkipped(Map<String, Object> channelsData, int currentObservationStep, boolean isFinalObservation) { return !isFinalObservation && (currentObservationStep % skipFrame != 0); } UniformSkippingFilter(int skipFrame); @Override boolean isSkipped(Map<String, Object> channelsData, int currentObservationStep, boolean isFinalObservation);  }