test_class.declarator: JAN2010 = new GregorianCalendar(2010, Calendar.JANUARY, 1).getTime()
test_class.modifier: private static final
test_class.original_string: private static final Date JAN2010 = new GregorianCalendar(2010, Calendar.JANUARY, 1).getTime();
test_class.type: Date
test_class.var_name: JAN2010
test_class.declarator: FEB2010 = new GregorianCalendar(2010, Calendar.FEBRUARY, 1).getTime()
test_class.modifier: private static final
test_class.original_string: private static final Date FEB2010 = new GregorianCalendar(2010, Calendar.FEBRUARY, 1).getTime();
test_class.type: Date
test_class.var_name: FEB2010
test_class.declarator: APR2010 = new GregorianCalendar(2010, Calendar.APRIL, 1).getTime()
test_class.modifier: private static final
test_class.original_string: private static final Date APR2010 = new GregorianCalendar(2010, Calendar.APRIL, 1).getTime();
test_class.type: Date
test_class.var_name: APR2010
test_class.declarator: MAY2010 = new GregorianCalendar(2010, Calendar.MAY, 1).getTime()
test_class.modifier: private static final
test_class.original_string: private static final Date MAY2010 = new GregorianCalendar(2010, Calendar.MAY, 1).getTime();
test_class.type: Date
test_class.var_name: MAY2010
test_class.file: jtstoolkit/src/test/java/ec/tstoolkit/timeseries/simplets/TsDataCollectorTest.java
test_class.identifier: TsDataCollectorTest
test_case.body: @Test
      public void testMake() {
          TsDataCollector dc = new TsDataCollector();
          EnumSet<TsFrequency> defined = complementOf(of(Undefined));
  
          // defined with single value
          dc.clear();
          dc.addObservation(JAN2010, 10);
          defined.forEach(o -> assertThat(dc.make(o, None)).isEqualTo(data(o, 2010, 0, 10)));
  
          // monthly with missing values
          dc.clear();
          dc.addObservation(JAN2010, 10);
          dc.addObservation(APR2010, 40);
          assertThat(dc.make(Monthly, None)).isEqualTo(data(Monthly, 2010, 0, 10, Double.NaN, Double.NaN, 40));
  
          // quarterly
          dc.clear();
          dc.addObservation(JAN2010, 10);
          dc.addObservation(APR2010, 40);
          assertThat(dc.make(Quarterly, None)).isEqualTo(data(Quarterly, 2010, 0, 10, 40));
  
          // undefined to monthly
          dc.clear();
          dc.addObservation(JAN2010, 10);
          dc.addObservation(FEB2010, 20);
          assertThat(dc.make(Undefined, None)).isEqualTo(data(Monthly, 2010, 0, 10, 20));
  
          // undefined to monthly with missing values
          dc.clear();
          dc.addObservation(JAN2010, 10);
          dc.addObservation(FEB2010, 20);
          dc.addObservation(MAY2010, 50);
          assertThat(dc.make(Undefined, None)).isEqualTo(data(Monthly, 2010, 0, 10, 20, Double.NaN, Double.NaN, 50));
  
          // undefined to quarterly
          dc.clear();
          dc.addObservation(JAN2010, 10);
          dc.addObservation(APR2010, 40);
          assertThat(dc.make(Undefined, None)).isEqualTo(data(Quarterly, 2010, 0, 10, 40));
  
          // defined with aggregation
          dc.clear();
          dc.addObservation(JAN2010, 12);
          dc.addObservation(JAN2010, 13);
          dc.addObservation(JAN2010, 10);
          dc.addObservation(JAN2010, 11);
          defined.forEach(o -> {
              assertThat(dc.make(o, First)).isEqualTo(data(o, 2010, 0, 12));
              assertThat(dc.make(o, Last)).isEqualTo(data(o, 2010, 0, 11));
              assertThat(dc.make(o, Min)).isEqualTo(data(o, 2010, 0, 10));
              assertThat(dc.make(o, Max)).isEqualTo(data(o, 2010, 0, 13));
              assertThat(dc.make(o, Average)).isEqualTo(data(o, 2010, 0, 46d / 4));
              assertThat(dc.make(o, Sum)).isEqualTo(data(o, 2010, 0, 46));
          });
  
          // unordered daily to monthly
          dc.clear();
          dc.addObservation(asDate(LocalDate.of(2010, 2, 1)), 20);
          dc.addObservation(asDate(LocalDate.of(2010, 1, 3)), 10);
          dc.addObservation(asDate(LocalDate.of(2010, 1, 4)), 11);
          dc.addObservation(asDate(LocalDate.of(2010, 1, 1)), 12);
          dc.addObservation(asDate(LocalDate.of(2010, 1, 2)), 13);
          assertThat(dc.make(Monthly, First)).isEqualTo(data(Monthly, 2010, 0, 12, 20));
          assertThat(dc.make(Monthly, Last)).isEqualTo(data(Monthly, 2010, 0, 11, 20));
          assertThat(dc.make(Monthly, Min)).isEqualTo(data(Monthly, 2010, 0, 10, 20));
          assertThat(dc.make(Monthly, Max)).isEqualTo(data(Monthly, 2010, 0, 13, 20));
          assertThat(dc.make(Monthly, Average)).isEqualTo(data(Monthly, 2010, 0, 46d / 4, 20));
          assertThat(dc.make(Monthly, Sum)).isEqualTo(data(Monthly, 2010, 0, 46, 20));
      }
test_case.class_method_signature: TsDataCollectorTest.testMake()
test_case.full_signature: @Test public void testMake()
test_case.identifier: testMake
test_case.invocations: complementOf of clear addObservation forEach isEqualTo assertThat make data clear addObservation addObservation isEqualTo assertThat make data clear addObservation addObservation isEqualTo assertThat make data clear addObservation addObservation isEqualTo assertThat make data clear addObservation addObservation addObservation isEqualTo assertThat make data clear addObservation addObservation isEqualTo assertThat make data clear addObservation addObservation addObservation addObservation forEach isEqualTo assertThat make data isEqualTo assertThat make data isEqualTo assertThat make data isEqualTo assertThat make data isEqualTo assertThat make data isEqualTo assertThat make data clear addObservation asDate of addObservation asDate of addObservation asDate of addObservation asDate of addObservation asDate of isEqualTo assertThat make data isEqualTo assertThat make data isEqualTo assertThat make data isEqualTo assertThat make data isEqualTo assertThat make data isEqualTo assertThat make data
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMake()
focal_class.declarator: m_obs
focal_class.modifier: private final
focal_class.original_string: private final LongObsList m_obs;
focal_class.type: LongObsList
focal_class.var_name: m_obs
focal_class.declarator: missing
focal_class.modifier: private
focal_class.original_string: private double missing;
focal_class.type: double
focal_class.var_name: missing
focal_class.file: jtstoolkit/src/main/java/ec/tstoolkit/timeseries/simplets/TsDataCollector.java
focal_class.identifier: TsDataCollector
focal_class.class_method_signature: TsDataCollector.TsDataCollector()
focal_class.full_signature: public  TsDataCollector()
focal_class.identifier: TsDataCollector
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  TsDataCollector()
focal_class.class_method_signature: TsDataCollector.addMissingValue(Date date)
focal_class.full_signature: public void addMissingValue(Date date)
focal_class.identifier: addMissingValue
focal_class.modifiers: public
focal_class.parameters: (Date date)
focal_class.return: void
focal_class.signature: void addMissingValue(Date date)
focal_class.class_method_signature: TsDataCollector.addObservation(Date date, double value)
focal_class.full_signature: public void addObservation(Date date, double value)
focal_class.identifier: addObservation
focal_class.modifiers: public
focal_class.parameters: (Date date, double value)
focal_class.return: void
focal_class.signature: void addObservation(Date date, double value)
focal_class.class_method_signature: TsDataCollector.clear()
focal_class.full_signature: public void clear()
focal_class.identifier: clear
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: TsDataCollector.data()
focal_class.full_signature: @NewObject public double[] data()
focal_class.identifier: data
focal_class.modifiers: @NewObject public
focal_class.parameters: ()
focal_class.return: double[]
focal_class.signature: double[] data()
focal_class.class_method_signature: TsDataCollector.getCount()
focal_class.full_signature: public int getCount()
focal_class.identifier: getCount
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getCount()
focal_class.class_method_signature: TsDataCollector.getMissingValue()
focal_class.full_signature: public double getMissingValue()
focal_class.identifier: getMissingValue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getMissingValue()
focal_class.class_method_signature: TsDataCollector.setMissingValue(double value)
focal_class.full_signature: public void setMissingValue(double value)
focal_class.identifier: setMissingValue
focal_class.modifiers: public
focal_class.parameters: (double value)
focal_class.return: void
focal_class.signature: void setMissingValue(double value)
focal_class.class_method_signature: TsDataCollector.make(TsFrequency frequency, TsAggregationType convMode)
focal_class.full_signature: public TsData make(TsFrequency frequency, TsAggregationType convMode)
focal_class.identifier: make
focal_class.modifiers: public
focal_class.parameters: (TsFrequency frequency, TsAggregationType convMode)
focal_class.return: TsData
focal_class.signature: TsData make(TsFrequency frequency, TsAggregationType convMode)
focal_class.class_method_signature: TsDataCollector.makeWithAggregation(ObsList obs, TsFrequency freq, TsAggregationType convMode)
focal_class.full_signature: @Internal public static TsData makeWithAggregation(ObsList obs, TsFrequency freq, TsAggregationType convMode)
focal_class.identifier: makeWithAggregation
focal_class.modifiers: @Internal public static
focal_class.parameters: (ObsList obs, TsFrequency freq, TsAggregationType convMode)
focal_class.return: TsData
focal_class.signature: TsData makeWithAggregation(ObsList obs, TsFrequency freq, TsAggregationType convMode)
focal_class.class_method_signature: TsDataCollector.isNewPeriod(int ncur, int curid, int[] ids)
focal_class.full_signature: private static boolean isNewPeriod(int ncur, int curid, int[] ids)
focal_class.identifier: isNewPeriod
focal_class.modifiers: private static
focal_class.parameters: (int ncur, int curid, int[] ids)
focal_class.return: boolean
focal_class.signature: boolean isNewPeriod(int ncur, int curid, int[] ids)
focal_class.class_method_signature: TsDataCollector.makeFromUnknownFrequency(ObsList obs)
focal_class.full_signature: @Internal public static TsData makeFromUnknownFrequency(ObsList obs)
focal_class.identifier: makeFromUnknownFrequency
focal_class.modifiers: @Internal public static
focal_class.parameters: (ObsList obs)
focal_class.return: TsData
focal_class.signature: TsData makeFromUnknownFrequency(ObsList obs)
focal_class.class_method_signature: TsDataCollector.makeIdsFromFrequency(ObsList obs, TsFrequency frequency, int[] ids)
focal_class.full_signature: private static boolean makeIdsFromFrequency(ObsList obs, TsFrequency frequency, int[] ids)
focal_class.identifier: makeIdsFromFrequency
focal_class.modifiers: private static
focal_class.parameters: (ObsList obs, TsFrequency frequency, int[] ids)
focal_class.return: boolean
focal_class.signature: boolean makeIdsFromFrequency(ObsList obs, TsFrequency frequency, int[] ids)
focal_class.class_method_signature: TsDataCollector.makeWithoutAggregation(ObsList obs, TsFrequency freq)
focal_class.full_signature: @Internal public static TsData makeWithoutAggregation(ObsList obs, TsFrequency freq)
focal_class.identifier: makeWithoutAggregation
focal_class.modifiers: @Internal public static
focal_class.parameters: (ObsList obs, TsFrequency freq)
focal_class.return: TsData
focal_class.signature: TsData makeWithoutAggregation(ObsList obs, TsFrequency freq)
focal_class.class_method_signature: TsDataCollector.expand(int currentSize, int expectedSize, int[] ids, IntToDoubleFunction valueFunc)
focal_class.full_signature: private static double[] expand(int currentSize, int expectedSize, int[] ids, IntToDoubleFunction valueFunc)
focal_class.identifier: expand
focal_class.modifiers: private static
focal_class.parameters: (int currentSize, int expectedSize, int[] ids, IntToDoubleFunction valueFunc)
focal_class.return: double[]
focal_class.signature: double[] expand(int currentSize, int expectedSize, int[] ids, IntToDoubleFunction valueFunc)
focal_method.body: public TsData make(TsFrequency frequency, TsAggregationType convMode) {
          if (frequency == TsFrequency.Undefined) {
              if (convMode != TsAggregationType.None) {
                  throw new TsException(TsException.INVALID_AGGREGATIONMODE);
              }
              return makeFromUnknownFrequency(m_obs);
          }
          if (convMode != TsAggregationType.None) {
              return makeWithAggregation(m_obs, frequency, convMode);
          }
          return makeWithoutAggregation(m_obs, frequency);
      }
focal_method.class_method_signature: TsDataCollector.make(TsFrequency frequency, TsAggregationType convMode)
focal_method.full_signature: public TsData make(TsFrequency frequency, TsAggregationType convMode)
focal_method.identifier: make
focal_method.invocations: makeFromUnknownFrequency makeWithAggregation makeWithoutAggregation
focal_method.modifiers: public
focal_method.parameters: (TsFrequency frequency, TsAggregationType convMode)
focal_method.return: TsData
focal_method.signature: TsData make(TsFrequency frequency, TsAggregationType convMode)