Class ResultMatrixCSV

  • All Implemented Interfaces:
    java.io.Serializable, OptionHandler, RevisionHandler

    public class ResultMatrixCSV
    extends ResultMatrix
    Generates the matrix in CSV ('comma-separated values') format.

    Valid options are:

     -mean-prec <int>
      The number of decimals after the decimal point for the mean.
      (default: 2)
     -stddev-prec <int>
      The number of decimals after the decimal point for the mean.
      (default: 2)
     -col-name-width <int>
      The maximum width for the column names (0 = optimal).
      (default: 0)
     -row-name-width <int>
      The maximum width for the row names (0 = optimal).
      (default: 0)
     -mean-width <int>
      The width of the mean (0 = optimal).
      (default: 0)
     -stddev-width <int>
      The width of the standard deviation (0 = optimal).
      (default: 0)
     -sig-width <int>
      The width of the significance indicator (0 = optimal).
      (default: 0)
     -count-width <int>
      The width of the counts (0 = optimal).
      (default: 0)
     -show-stddev
      Whether to display the standard deviation column.
      (default: no)
     -show-avg
      Whether to show the row with averages.
      (default: no)
     -remove-filter
      Whether to remove the classname package prefixes from the
      filter names in datasets.
      (default: no)
     -print-col-names
      Whether to output column names or just numbers representing them.
      (default: no)
     -print-row-names
      Whether to output row names or just numbers representing them.
      (default: no)
     -enum-col-names
      Whether to enumerate the column names (prefixing them with 
      '(x)', with 'x' being the index).
      (default: no)
     -enum-row-names
      Whether to enumerate the row names (prefixing them with 
      '(x)', with 'x' being the index).
      (default: no)
    Version:
    $Revision: 8034 $
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • ResultMatrixCSV

        public ResultMatrixCSV()
        initializes the matrix as 1x1 matrix.
      • ResultMatrixCSV

        public ResultMatrixCSV​(int cols,
                               int rows)
        initializes the matrix with the given dimensions.
        Parameters:
        cols - the number of columns
        rows - the number of rows
      • ResultMatrixCSV

        public ResultMatrixCSV​(ResultMatrix matrix)
        initializes the matrix with the values from the given matrix.
        Parameters:
        matrix - the matrix to get the values from
    • Method Detail

      • globalInfo

        public java.lang.String globalInfo()
        Returns a string describing the matrix.
        Specified by:
        globalInfo in class ResultMatrix
        Returns:
        a description suitable for displaying in the experimenter gui
      • getDisplayName

        public java.lang.String getDisplayName()
        returns the name of the output format.
        Specified by:
        getDisplayName in class ResultMatrix
        Returns:
        the display name
      • clear

        public void clear()
        removes the stored data but retains the dimensions of the matrix.
        Overrides:
        clear in class ResultMatrix
      • getDefaultRowNameWidth

        public int getDefaultRowNameWidth()
        returns the default width for the row names.
        Overrides:
        getDefaultRowNameWidth in class ResultMatrix
        Returns:
        the width
      • getDefaultPrintColNames

        public boolean getDefaultPrintColNames()
        returns the default of whether column names or numbers instead are printed.
        Overrides:
        getDefaultPrintColNames in class ResultMatrix
        Returns:
        true if names instead of numbers are printed
      • getDefaultEnumerateColNames

        public boolean getDefaultEnumerateColNames()
        returns the default of whether column names are prefixed with the index.
        Overrides:
        getDefaultEnumerateColNames in class ResultMatrix
        Returns:
        true if the names are prefixed
      • toStringMatrix

        public java.lang.String toStringMatrix()
        returns the matrix in CSV format.
        Specified by:
        toStringMatrix in class ResultMatrix
        Returns:
        the matrix as string
      • toStringKey

        public java.lang.String toStringKey()
        returns a key for all the col names, for better readability if the names got cut off.
        Specified by:
        toStringKey in class ResultMatrix
        Returns:
        the key
      • toStringSummary

        public java.lang.String toStringSummary()
        returns the summary as string.
        Specified by:
        toStringSummary in class ResultMatrix
        Returns:
        the summary
      • toStringRanking

        public java.lang.String toStringRanking()
        returns the ranking in a string representation.
        Specified by:
        toStringRanking in class ResultMatrix
        Returns:
        the ranking
      • getRevision

        public java.lang.String getRevision()
        Returns the revision string.
        Returns:
        the revision
      • main

        public static void main​(java.lang.String[] args)
        for testing only.
        Parameters:
        args - ignored