Class MetricFileReader

java.lang.Object
org.moeaframework.analysis.io.MatrixReader
org.moeaframework.analysis.io.MetricFileReader
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<double[]>, Iterator<double[]>

public class MetricFileReader extends MatrixReader
Reader for metric files produced by MetricFileWriter. The file can contain commented lines starting with '#' characters.

This reader is expected to gracefully recover from incomplete or improperly formatted files. Unless a serious I/O error occurred, this reader will attempt to load the file to the last valid entry. This requirement enables a MetricFileWriter to resume processing at a valid state.

See Also:
  • Constructor Details

    • MetricFileReader

      public MetricFileReader(File file) throws FileNotFoundException
      Constructs a metric file reader for reading metric files from the specified file.
      Parameters:
      file - the metric file
      Throws:
      FileNotFoundException - if the file was not found
    • MetricFileReader

      public MetricFileReader(Reader reader)
      Constructs a metric file reader for reading metric files from the underlying reader.
      Parameters:
      reader - the underlying reader
  • Method Details