TestUtil.assertClose(imported[0][1], 4, .0001f);
TestUtil.assertClose(imported[0][2], 7, .0001f);
}
public void testExportTimeSeriesFileFloat() throws IOException {
TimeSeries ts = new TimeSeriesImpl(new float[]{1, 2, 3},
new float[][]{new float[]{4, 7}, new float[]{5, 8}, new float[]{6, 9}},
Units.uniform(Units.UNK, 2));
myExporter.export(ts, myFile, .5f);
TimeSeries filtered = Plotter.filter(ts, .5f);
float[][] imported = myExporter.importAsMatrix(myFile);
TestUtil.assertClose(imported[0][0], filtered.getTimes()[0], .0001f);
TestUtil.assertClose(imported[1][0], filtered.getTimes()[1], .0001f);
TestUtil.assertClose(imported[0][1], filtered.getValues()[0][0], .0001f);
TestUtil.assertClose(imported[0][2], filtered.getValues()[0][1], .0001f);
}