public class Checkpoint
extends java.lang.Object
checkpointPrefix.generation.gz
...where checkpointPrefix is the checkpoing prefix given in ec.EvolutionState, and generation is the current generation number also given in ec.EvolutionState. The ".gz" is added because the file is GZIPped to save space.
When writing a checkpoint file, if you have specified a checkpoint directory in ec.EvolutionState.checkpointDirectory, then this directory will be used to write the checkpoint files. Otherwise they will be written in your working directory (where you ran the Java process).
Constructor and Description |
---|
Checkpoint() |
Modifier and Type | Method and Description |
---|---|
static EvolutionState |
restoreFromCheckpoint(java.lang.String checkpoint)
Returns an EvolutionState object read from a checkpoint file
whose filename is checkpoint
|
static void |
setCheckpoint(EvolutionState state)
Writes the evolution state out to a file.
|
public static void setCheckpoint(EvolutionState state)
public static EvolutionState restoreFromCheckpoint(java.lang.String checkpoint) throws java.io.IOException, java.lang.ClassNotFoundException, java.io.OptionalDataException
java.lang.ClassNotFoundException
- thrown when the checkpoint file contains a class reference which doesn't exist in your class hierarchy.java.io.IOException
java.io.OptionalDataException