|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp3j.experiment.results.ResultExport
public class ResultExport
Class responsible for exporting results. There are three modes: Create report: aggregates all data to be displayed in the result report. Export aggregated data: exports various data aggregations, does not copy or generate report-related files. Export data: exports all raw data, to be analyzed with other tools. TODO: Remove hard-coded density-plot years here and in plotting.R!
Field Summary | |
---|---|
static String |
R_LIBRARY
The name of the R library required for report generation. |
Constructor Summary | |
---|---|
ResultExport(ProjectionModel projectionModel,
File targetDirectory,
IResultFilter resultFilter)
Instantiates a new result export. |
Method Summary | |
---|---|
protected double[][] |
calcQuantiles(double[][] inputMatrix)
Calculates quantiles per column. |
protected String |
createEquidistantDensityYearList(int jumpOffYear)
Creates the density year list. |
void |
createResultReport()
Creates result report displaying aggregated results. |
void |
exportAggregatedResults()
Exports aggregated data. |
void |
exportAllResults()
Exports all results. |
protected double[][] |
filter(double[][] original)
Filter out all unnecessary data. |
IResultFilter |
getResultFilter()
Gets the result filter. |
static StringBuilder |
toCSV(double[][] matrix,
char delim)
Export to CSV. |
protected void |
writeResult(File destinationDir,
double[][] result,
String fileName)
Write result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String R_LIBRARY
Constructor Detail |
---|
public ResultExport(ProjectionModel projectionModel, File targetDirectory, IResultFilter resultFilter)
projectionModel
- the projection modeltargetDirectory
- the target directoryresultFilter
- the result filter to be usedMethod Detail |
---|
public void exportAllResults() throws IOException
IOException
- if export failspublic void exportAggregatedResults() throws IOException
selectedDir
- the selected directory for export
IOException
- if data storage failedpublic void createResultReport() throws IOException, freemarker.template.TemplateException
IOException
- if aggregation of data fails
freemarker.template.TemplateException
- if processing of report template failsprotected double[][] calcQuantiles(double[][] inputMatrix)
inputMatrix
- the input matrix
protected String createEquidistantDensityYearList(int jumpOffYear)
protected double[][] filter(double[][] original)
original
- the original
protected void writeResult(File destinationDir, double[][] result, String fileName) throws IOException
destinationDir
- the destination dirresult
- the resultfileName
- the file name
IOException
- Signals that an I/O exception has occurred.public static StringBuilder toCSV(double[][] matrix, char delim)
matrix
- the matrixdelim
- the delimiter
public IResultFilter getResultFilter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |