Class MetricFileReader

java.lang.Object
org.moeaframework.util.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.

By default, this reader will suppress any errors reading the contents, unless a serious I/O error occurred. Consequently, reading stops when invalid or incomplete data is detected. Callers should use MatrixReader.getErrorHandler() to check if any errors occurred or to change the error handling behavior.

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