Class RowStatistic

  • All Implemented Interfaces:
    Destroyable, ErrorProvider, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class RowStatistic
    extends AbstractRowScore
    Applies the specified row statistic algorithm and returns the specified cell's value as score.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -statistic <adams.data.spreadsheet.rowstatistic.AbstractRowStatistic> (property: statistic)
        The row statistic to use.
        default: adams.data.spreadsheet.rowstatistic.Mean
     
    -column <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: column)
        The column of the cell from the row statistic's output to use as score.
        default: 2
        example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last
     
    -row <adams.core.Index> (property: row)
        The row of the cell from the row statistic's output to use as score.
        default: 1
        example: An index is a number starting with 1; the following placeholders can be used as well: first, second, third, last_2, last_1, last
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Row

        protected Index m_Row
        the row of the cell to pick from the stats' output.
    • Constructor Detail

      • RowStatistic

        public RowStatistic()
    • Method Detail

      • setStatistic

        public void setStatistic​(AbstractRowStatistic value)
        Sets the row statistic to use.
        Parameters:
        value - the statistic
      • getStatistic

        public AbstractRowStatistic getStatistic()
        Returns the row statistic in use.
        Returns:
        the statistic
      • statisticTipText

        public String statisticTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColumn

        public void setColumn​(SpreadSheetColumnIndex value)
        Sets the cell's column to get the score from.
        Parameters:
        value - the column
      • getColumn

        public SpreadSheetColumnIndex getColumn()
        Returns the cell's column to get the score from.
        Returns:
        the column
      • columnTipText

        public String columnTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRow

        public void setRow​(Index value)
        Sets the cell's row to get the score from.
        Parameters:
        value - the row
      • getRow

        public Index getRow()
        Returns the cell's row to get the score from.
        Returns:
        the row
      • rowTipText

        public String rowTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getNumScores

        public int getNumScores()
        Returns how many score values will get generated.
        Specified by:
        getNumScores in class AbstractRowScore
        Returns:
        the number of scores
      • doCalculateScore

        protected Double[] doCalculateScore​(SpreadSheet sheet,
                                            int rowIndex)
        Performs the actual calculation of the row score.
        Specified by:
        doCalculateScore in class AbstractRowScore
        Parameters:
        sheet - the spreadsheet to generate the score for
        rowIndex - the row index
        Returns:
        the generated score, null in case of an error