Fixed csv

- added examples.csv
- fixed csv logic for header and first line
This commit is contained in:
2025-01-30 11:46:25 +01:00
parent 5e5b51e38c
commit 8c349d6eec
8 changed files with 5045 additions and 10 deletions

View File

@@ -36,7 +36,9 @@ public class CsvResult {
*/
public void saveResults(Result[] results) throws IOException {
var builder = new StringBuilder();
builder.append("seed,node,");
builder.append(String.join(",", Statistics.getOrderOfApply()));
builder.append('\n');
try (var writer = new FileWriter(this.file)) {
for (var result : results) {
@@ -97,6 +99,8 @@ public class CsvResult {
builder.append(val).append(",");
return val;
});
builder.deleteCharAt(builder.length() - 1); // remove the last comma
return builder.toString();
}