test_class.file: contrib/src/test/java/macrobase/analysis/transform/aggregate/IncrementalWindowCountTest.java
test_class.identifier: IncrementalWindowCountTest
test_case.body: @Test
      public void testWindowUpdate() throws Exception {
          List<Datum> data = new ArrayList<>();
          for (int i = 0; i < 20; ++i) {
              Datum d = TestUtils.createTimeDatum(i, i);
              data.add(d);
          }
  
          MacroBaseConf conf = new MacroBaseConf().set(MacroBaseConf.TIME_COLUMN, 0);
          IncrementalWindowCount windowCount = new IncrementalWindowCount(conf);
          // First window
          Datum count = windowCount.updateWindow(data.subList(0, 10), new ArrayList<>());
          assert(count.metrics().getEntry(1) == 10);
          // Update window
          count = windowCount.updateWindow(data.subList(10, 11), data.subList(0, 1));
          assert(count.metrics().getEntry(1) == 10);
          count = windowCount.updateWindow(data.subList(11, 20), data.subList(1, 5));
          assert(count.metrics().getEntry(1) == 15);
          count = windowCount.updateWindow(new ArrayList<>(), data.subList(5, 10));
          assert(count.metrics().getEntry(1) == 10);
      }
test_case.class_method_signature: IncrementalWindowCountTest.testWindowUpdate()
test_case.full_signature: @Test public void testWindowUpdate()
test_case.identifier: testWindowUpdate
test_case.invocations: createTimeDatum add set updateWindow subList getEntry metrics updateWindow subList subList getEntry metrics updateWindow subList subList getEntry metrics updateWindow subList getEntry metrics
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWindowUpdate()
focal_class.declarator: count = 0
focal_class.modifier: private
focal_class.original_string: private int count = 0;
focal_class.type: int
focal_class.var_name: count
focal_class.file: contrib/src/main/java/macrobase/analysis/transform/aggregate/IncrementalWindowCount.java
focal_class.identifier: IncrementalWindowCount
focal_class.class_method_signature: IncrementalWindowCount.IncrementalWindowCount(MacroBaseConf conf)
focal_class.full_signature: public  IncrementalWindowCount(MacroBaseConf conf)
focal_class.identifier: IncrementalWindowCount
focal_class.modifiers: public
focal_class.parameters: (MacroBaseConf conf)
focal_class.signature:  IncrementalWindowCount(MacroBaseConf conf)
focal_class.class_method_signature: IncrementalWindowCount.updateWindow(List<Datum> new_data, List<Datum> old_data)
focal_class.full_signature: public Datum updateWindow(List<Datum> new_data, List<Datum> old_data)
focal_class.identifier: updateWindow
focal_class.modifiers: public
focal_class.parameters: (List<Datum> new_data, List<Datum> old_data)
focal_class.return: Datum
focal_class.signature: Datum updateWindow(List<Datum> new_data, List<Datum> old_data)
focal_class.superclass: extends IncrementalWindowAggregate
focal_method.body: public Datum updateWindow(List<Datum> new_data, List<Datum> old_data) {
          if (new_data.isEmpty() && old_data.isEmpty())
              return currWindow;
  
          if (currWindow == null) {
              dim = new_data.get(0).metrics().getDimension();
          }
          count += new_data.size() - old_data.size();
          RealVector results = new ArrayRealVector(dim);
          results.set(count);
          currWindow = new Datum(new ArrayList<>(), results);
          return currWindow;
      }
focal_method.class_method_signature: IncrementalWindowCount.updateWindow(List<Datum> new_data, List<Datum> old_data)
focal_method.full_signature: public Datum updateWindow(List<Datum> new_data, List<Datum> old_data)
focal_method.identifier: updateWindow
focal_method.invocations: isEmpty isEmpty getDimension metrics get size size set
focal_method.modifiers: public
focal_method.parameters: (List<Datum> new_data, List<Datum> old_data)
focal_method.return: Datum
focal_method.signature: Datum updateWindow(List<Datum> new_data, List<Datum> old_data)