source: java/ecj/cecj/statistics/CoevolutionaryStatistics.java @ 224

Last change on this file since 224 was 193, checked in by Maciej Komosinski, 11 years ago

Set svn:eol-style native for all textual files

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1package cecj.statistics;
2
3import java.io.File;
4import java.io.IOException;
5import java.util.List;
6
7import cecj.interaction.InteractionResult;
8
9
10import ec.EvolutionState;
11import ec.simple.SimpleStatistics;
12import ec.util.Output;
13import ec.util.Parameter;
14
15public abstract class CoevolutionaryStatistics extends SimpleStatistics {
16
17        public CoevolutionaryStatistics() {
18                statisticslog = 0;
19        }
20
21        @Override
22        public void setup(final EvolutionState state, final Parameter base) {
23                super.setup(state, base);
24
25                File statisticsFile = state.parameters.getFile(base.push(P_STATISTICS_FILE), null);
26
27                if (statisticsFile != null) {
28                        try {
29                                statisticslog = state.output.addLog(statisticsFile, Output.V_NO_GENERAL - 1, false,
30                                                                                                        false, false);
31                        } catch (IOException i) {
32                                state.output.fatal("An IOException occurred while trying to create the log "
33                                                + statisticsFile + ":\n" + i);
34                        }
35                }
36        }
37
38        public abstract void printInteractionResults(EvolutionState state,
39                        List<List<InteractionResult>> result, int subpop);
40
41}
Note: See TracBrowser for help on using the repository browser.