@Test public void testCreate() { TimeSeriesIndex index = new TestTimeSeriesIndex(0L, 3); DoubleTimeSeries ts1 = TimeSeries.createDouble("ts1", index, 0d, 1d, 2d); assertEquals("ts1", ts1.getMetadata().getName()); assertEquals(TimeSeriesDataType.DOUBLE, ts1.getMetadata().getDataType()); assertArrayEquals(new double[] {0d, 1d, 2d}, ts1.toArray(), 0d); }
@Override public double[] toArray() { DoubleBuffer buffer = DoubleBuffer.allocate(metadata.getIndex().getPointCount()); for (int i = 0; i < metadata.getIndex().getPointCount(); i++) { buffer.put(i, Double.NaN); } fillBuffer(buffer, 0); return buffer.array(); }
StoredDoubleTimeSeries extends AbstractTimeSeries<DoublePoint, DoubleDataChunk, DoubleTimeSeries> implements DoubleTimeSeries { @Override public double[] toArray() { DoubleBuffer buffer = DoubleBuffer.allocate(metadata.getIndex().getPointCount()); for (int i = 0; i < metadata.getIndex().getPointCount(); i++) { buffer.put(i, Double.NaN); } fillBuffer(buffer, 0); return buffer.array(); } }
StoredDoubleTimeSeries extends AbstractTimeSeries<DoublePoint, DoubleDataChunk, DoubleTimeSeries> implements DoubleTimeSeries { @Override public double[] toArray() { DoubleBuffer buffer = DoubleBuffer.allocate(metadata.getIndex().getPointCount()); for (int i = 0; i < metadata.getIndex().getPointCount(); i++) { buffer.put(i, Double.NaN); } fillBuffer(buffer, 0); return buffer.array(); } StoredDoubleTimeSeries(TimeSeriesMetadata metadata, DoubleDataChunk... chunks);  StoredDoubleTimeSeries(TimeSeriesMetadata metadata, List<DoubleDataChunk> chunks); }
StoredDoubleTimeSeries extends AbstractTimeSeries<DoublePoint, DoubleDataChunk, DoubleTimeSeries> implements DoubleTimeSeries { @Override public double[] toArray() { DoubleBuffer buffer = DoubleBuffer.allocate(metadata.getIndex().getPointCount()); for (int i = 0; i < metadata.getIndex().getPointCount(); i++) { buffer.put(i, Double.NaN); } fillBuffer(buffer, 0); return buffer.array(); } StoredDoubleTimeSeries(TimeSeriesMetadata metadata, DoubleDataChunk... chunks);  StoredDoubleTimeSeries(TimeSeriesMetadata metadata, List<DoubleDataChunk> chunks); @Override void fillBuffer(DoubleBuffer buffer, int timeSeriesOffset); @Override void fillBuffer(BigDoubleBuffer buffer, long timeSeriesOffset); @Override double[] toArray(); }
StoredDoubleTimeSeries extends AbstractTimeSeries<DoublePoint, DoubleDataChunk, DoubleTimeSeries> implements DoubleTimeSeries { @Override public double[] toArray() { DoubleBuffer buffer = DoubleBuffer.allocate(metadata.getIndex().getPointCount()); for (int i = 0; i < metadata.getIndex().getPointCount(); i++) { buffer.put(i, Double.NaN); } fillBuffer(buffer, 0); return buffer.array(); } StoredDoubleTimeSeries(TimeSeriesMetadata metadata, DoubleDataChunk... chunks);  StoredDoubleTimeSeries(TimeSeriesMetadata metadata, List<DoubleDataChunk> chunks); @Override void fillBuffer(DoubleBuffer buffer, int timeSeriesOffset); @Override void fillBuffer(BigDoubleBuffer buffer, long timeSeriesOffset); @Override double[] toArray();  }