|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.moeaframework.core.PopulationIO
public class PopulationIO
Collection of static methods for reading and writing populations to files.
The write(java.io.File, java.lang.Iterable and read(java.io.File) methods should be used when storing and
retrieving solutions to be used by this framework. The
writeObjectives(java.io.File, java.lang.Iterable and readObjectives(java.io.BufferedReader) should be used when the
data is accessed by external programs, as these two methods store the data in
a human-readable form.
| Method Summary | |
|---|---|
static Population |
read(File file)
Reads a population from the specified file. |
static Population |
readObjectives(BufferedReader reader)
Parses the objective vectors contained in the specified reader, returning the resulting population. |
static Population |
readObjectives(File file)
Reads a set of objective vectors from the specified file. |
static void |
write(File file,
Iterable<Solution> solutions)
Writes a collection of solutions to the specified file. |
static void |
writeObjectives(File file,
Iterable<Solution> solutions)
Writes the objective vectors of all solutions to the specified file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Population readObjectives(BufferedReader reader)
throws IOException
reader - the reader containing the objective vectors
IOException - if an I/O error occurred
public static Population readObjectives(File file)
throws IOException
writeObjectives method.
file - the file containing the objective vectors
IOException - if an I/O exception occurred
public static void writeObjectives(File file,
Iterable<Solution> solutions)
throws IOException
loadObjectives method.
file - the file to which the objective vectors are writtensolutions - the solutions whose objective vectors are written to
the specified file
IOException - if an I/O exception occurred
public static void write(File file,
Iterable<Solution> solutions)
throws IOException
read(java.io.File) method.
This method relies on serialization.
file - the file to which the solutions are writtensolutions - the solutions to be written in the specified file
IOException - if an I/O exception occurred
public static Population read(File file)
throws IOException
write(java.io.File, java.lang.Iterable) method. This
method relies on serialization.
file - the file containing the population
IOException - if an I/O exception occurred
|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||