SolutionType - solution type of the analyzed problemspublic class AnalysisResults<SolutionType extends Solution> extends Object
Analysis object. The results can be accessed directly or
written to a JSON file (see writeJSON(String) and writeJSON(String, JsonConverter)) that can
then be loaded into R to be inspected and visualized using the james-analysis R package.| Constructor and Description |
|---|
AnalysisResults()
Create an empty results object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumProblems()
Get the number of analyzed problems.
|
int |
getNumRuns(String problemID,
String searchID)
Get the number of performed runs of the given search when solving the given problem.
|
int |
getNumSearches(String problemID)
Get the number of different searches that have been applied to solve the problem with the given ID.
|
Set<String> |
getProblemIDs()
Get the IDs of the analyzed problems (unmodifiable view).
|
SearchRunResults<SolutionType> |
getRun(String problemID,
String searchID,
int i)
Get the results of the i-th performed run of the given search when solving the given problem.
|
Set<String> |
getSearchIDs(String problemID)
Get the IDs of the different searches that have been applied to solve the problem with the
given ID (unmodifiable view).
|
AnalysisResults<SolutionType> |
merge(AnalysisResults<SolutionType> otherResults)
Merge the given results into this results object.
|
void |
registerSearchRun(String problemID,
String searchID,
SearchRunResults<SolutionType> run)
Register results of a search run, specifying the IDs of the problem being solved and the applied search.
|
void |
writeJSON(String filePath)
Write the results to a JSON file that can be loaded into R to be inspected and visualized using
the james-analysis R package.
|
void |
writeJSON(String filePath,
JsonConverter<SolutionType> solutionJsonConverter)
Write the results to a JSON file that can be loaded into R to be inspected and visualized using
the james-analysis R package.
|
public AnalysisResults<SolutionType> merge(AnalysisResults<SolutionType> otherResults)
otherResults - other results to be merged into this results objectpublic void registerSearchRun(String problemID, String searchID, SearchRunResults<SolutionType> run)
problemID - ID of the problem being solvedsearchID - ID of the applied searchrun - results of the search runpublic int getNumProblems()
public Set<String> getProblemIDs()
public int getNumSearches(String problemID)
problemID - ID of the problemUnknownIDException - if an unknown problem ID is givenpublic Set<String> getSearchIDs(String problemID)
problemID - ID of the problemUnknownIDException - if an unknown problem ID is givenpublic int getNumRuns(String problemID, String searchID)
problemID - ID of the problemsearchID - ID of the applied searchUnknownIDException - if an unknown problem or search ID is givenpublic SearchRunResults<SolutionType> getRun(String problemID, String searchID, int i)
problemID - ID of the problemsearchID - ID of the applied searchi - search run indexUnknownIDException - if an unknown problem or search ID is givenIndexOutOfBoundsException - if there is no i-th run for this search and problempublic void writeJSON(String filePath) throws IOException
writeJSON(String, JsonConverter).filePath - path of the file to which the JSON output is writtenIOException - if an I/O error occurs when writing to the filepublic void writeJSON(String filePath, JsonConverter<SolutionType> solutionJsonConverter) throws IOException
null, the actual solutions are not stored in the output file.filePath - path of the file to which the JSON output is writtensolutionJsonConverter - converts solutions to a JSON representationIOException - if an I/O error occurs when writing to the fileCopyright © 2016. All rights reserved.