Skip to content
Snippets Groups Projects
Commit 5a6cd0b2 authored by Bernhard Johannes Berger's avatar Bernhard Johannes Berger
Browse files

Fixed named of components #46 and added support of Objects in output generation.

parent 8d69d611
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ import java.util.List;
* Small helper class for collecting and writing the generation-based statistics.
*/
@Slf4j
@Named("best-candidate-per-generation")
@Named("de.evoal.core.optimisation.best-candidate-per-generation")
@Dependent
public class BestCandidatePerGeneration implements StatisticsWriter {
......@@ -93,13 +93,16 @@ public class BestCandidatePerGeneration implements StatisticsWriter {
}
private ColumnType toColumnType(final PropertySpecification spec) {
Requirements.requireInstanceOf(spec.type(), BaseDataDescription.class);
return switch (((BaseDataDescription)spec.type()).getRepresentation()) {
case REAL -> ColumnType.Double;
case INTEGER -> ColumnType.Integer;
case STRING -> ColumnType.String;
case BOOLEAN -> ColumnType.Boolean;
};
if(spec.type() instanceof BaseDataDescription) {
return switch (((BaseDataDescription)spec.type()).getRepresentation()) {
case REAL -> ColumnType.Double;
case INTEGER -> ColumnType.Integer;
case STRING -> ColumnType.String;
case BOOLEAN -> ColumnType.Boolean;
};
} else {
return ColumnType.String;
}
}
@SneakyThrows
......
......@@ -27,7 +27,7 @@ import java.util.List;
* Small helper class for collecting and writing the generation-based statistics.
*/
@Slf4j
@Named("candidates-per-generation")
@Named("de.evoal.core.optimisation.candidates-per-generation")
@Dependent
public class CandidatesPerGeneration extends AbstractCandidateStatisticsWriter {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment