public class DelimitedFileExporter
extends java.lang.Object
Constructor and Description |
---|
DelimitedFileExporter()
Uses default column delimiter ", " and row delimiter "\r\n".
|
DelimitedFileExporter(java.lang.String columnDelim,
java.lang.String rowDelim) |
Modifier and Type | Method and Description |
---|---|
void |
export(float[][] matrix,
java.io.File file)
Exports a matrix with rows and columns delimited as specified in the constructor.
|
void |
export(SpikePattern pattern,
java.io.File file)
Exports a SpikePattern as a matrix with spikes times of each neuron in a different row.
|
void |
export(TimeSeries series,
java.io.File file)
Exports a TimeSeries with times in the first column and data from each dimension in subsequent columns.
|
void |
export(TimeSeries series,
java.io.File file,
float tau)
Exports a TimeSeries as a matrix with times in the first column and data from each dimension
in subsequent rows.
|
float[][] |
importAsMatrix(java.io.File file)
Imports a delimited file as a matrix.
|
public DelimitedFileExporter()
public DelimitedFileExporter(java.lang.String columnDelim, java.lang.String rowDelim)
columnDelim
- String used to delimit items within a matrix rowrowDelim
- String used to delimit rows of a matrixpublic void export(TimeSeries series, java.io.File file) throws java.io.IOException
series
- TimeSeries to exportfile
- File to which to export the TimeSeriesjava.io.IOException
- if there's a problem writing to diskpublic void export(TimeSeries series, java.io.File file, float tau) throws java.io.IOException
series
- TimeSeries to exportfile
- File to which to export the TimeSeriestau
- Time constant with which to filter datajava.io.IOException
- if there's a problem writing to diskpublic void export(SpikePattern pattern, java.io.File file) throws java.io.IOException
pattern
- SpikePattern to exportfile
- File to which to export the SpikePatternjava.io.IOException
- if there's a problem writing to diskpublic void export(float[][] matrix, java.io.File file) throws java.io.IOException
matrix
- The matrix to exportfile
- File to which to export the matrixjava.io.IOException
- if there's a problem writing to diskpublic float[][] importAsMatrix(java.io.File file) throws java.io.IOException
file
- File from which to load matrixjava.io.IOException
- if there's a problem writing to disk