Examples of LocalDateDoubleEntryIterator


Examples of com.opengamma.timeseries.date.localdate.LocalDateDoubleEntryIterator

    final int n = ts.size();
    final int[] filteredDates = new int[n];
    final double[] filteredData = new double[n];
    final int[] rejectedDates = new int[n];
    final double[] rejectedData = new double[n];
    final LocalDateDoubleEntryIterator it = ts.iterator();
    int i = 0, j = 0;
    while (it.hasNext()) {
      int date = it.nextTimeFast();
      double value = it.currentValue();
      if (Math.abs(value - mean) > _standardDeviations * std) {
        rejectedDates[j] = date;
        rejectedData[j++] = value;
      } else {
        filteredDates[i] = date;
View Full Code Here

Examples of com.opengamma.timeseries.date.localdate.LocalDateDoubleEntryIterator

                                                         String dataSource,
                                                         String dataProvider,
                                                         String dataField,
                                                         String observationTime,
                                                         LocalDateDoubleTimeSeries series) {
          final LocalDateDoubleEntryIterator iterator = series.iterator();
          while (iterator.hasNext()) {
            final Map.Entry<LocalDate, Double> entry = iterator.next();
            final UniqueId id = UniqueId.of(htsId.getScheme().getName(), htsId.getValue());
            source.updateTimeSeriesPoint(id, source.getCurrentSimulationExecutionDate(), entry.getKey(), entry.getValue());
          }
          return series;
        }
View Full Code Here

Examples of com.opengamma.timeseries.date.localdate.LocalDateDoubleEntryIterator

   
    hts = simulationSource.getHistoricalTimeSeries(id, null, false, null, false);
    assertNotNull(hts);
    assertEquals(id, hts.getUniqueId());
    assertEquals(29, hts.getTimeSeries().size());
    LocalDateDoubleEntryIterator iterator = hts.getTimeSeries().iterator();
    int i = 1;
    while (iterator.hasNext()) {
      iterator.next();
      assertEquals(LocalDate.of(2013, 4, i), iterator.currentTime());
      assertEquals((double)i, iterator.currentValueFast(), 0.001);
      i++;
    }
   
    hts = simulationSource.getHistoricalTimeSeries(generateId(6), null, false, null, false);
    assertNull(hts);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.