Last change
on this file since 84 was
44,
checked in by mszubert, 15 years ago
|
cecj, framsticks and games packages imported
|
File size:
1.0 KB
|
Rev | Line | |
---|
[44] | 1 | package cecj.statistics; |
---|
| 2 | |
---|
| 3 | import java.io.File; |
---|
| 4 | import java.io.IOException; |
---|
| 5 | import java.util.List; |
---|
| 6 | |
---|
| 7 | import cecj.interaction.InteractionResult; |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | import ec.EvolutionState; |
---|
| 11 | import ec.simple.SimpleStatistics; |
---|
| 12 | import ec.util.Output; |
---|
| 13 | import ec.util.Parameter; |
---|
| 14 | |
---|
| 15 | public 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.