Class MeasureOutput

java.lang.Object
dataAnalysis.MeasureOutput
Direct Known Subclasses:
CSVMeasureOutput, VerboseCSVMeasureOutput, XMLMeasureOutput

public abstract class MeasureOutput extends Object
A measure output object is used to print a measure value(s). it is an abstract class, whose methods should be overridden to implement the way in which each kind of measure should be written on the output stream.
Author:
Francesco Radaelli, Marco Bertoli
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Measure
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of MeasureOutput class.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Overrides this method to implement the way in which the final measure should be written on an output stream.
    abstract File
    Returns the output file for this measure output
    abstract void
    write(double sample, double weight)
    Overrides this method to implement the way in which each measure should be written on an output stream.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • measure

      protected Measure measure
  • Constructor Details

    • MeasureOutput

      public MeasureOutput(Measure measure)
      Creates a new instance of MeasureOutput class.
      Parameters:
      measure - Reference to the measure to be written as output.
  • Method Details

    • write

      public abstract void write(double sample, double weight)
      Overrides this method to implement the way in which each measure should be written on an output stream. This method is called for every sample.
      Parameters:
      sample - the measure sample
      weight - the sample weight
    • finalizeMeasure

      public abstract void finalizeMeasure()
      Overrides this method to implement the way in which the final measure should be written on an output stream. This method is called at the end of a measure.
    • getOutputFile

      public abstract File getOutputFile()
      Returns the output file for this measure output
      Returns:
      a reference to the output file