Class HeatmapStatistic

  • All Implemented Interfaces:
    adams.data.spreadsheet.SpreadSheetSupporter, adams.data.statistics.InformativeStatistic

    public class HeatmapStatistic
    extends Object
    implements adams.data.statistics.InformativeStatistic
    Generates some statistics for a heatmap.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • WIDTH

        public static String WIDTH
        the width.
      • HEIGHT

        public static String HEIGHT
        the height.
      • MINIMUM

        public static String MINIMUM
        the minimum value.
      • MAXIMUM

        public static String MAXIMUM
        the maximum value.
      • COUNT_ZEROES

        public static String COUNT_ZEROES
        the zeroes count.
      • COUNT_NONZEROES

        public static String COUNT_NONZEROES
        the non-zeroes count.
      • COUNT_MISSING

        public static String COUNT_MISSING
        the missing value count.
      • m_Heatmap

        protected Heatmap m_Heatmap
        the heatmap to create the statistics for.
    • Constructor Detail

      • HeatmapStatistic

        public HeatmapStatistic()
        Initializes the statistics.
      • HeatmapStatistic

        public HeatmapStatistic​(Heatmap map)
        Initializes the statistics with the specified heatmap.
        Parameters:
        map - the heatmap to generate the stats for
    • Method Detail

      • setHeatmap

        public void setHeatmap​(Heatmap value)
        Sets the heatmap to generate the statistics for.
        Parameters:
        value - the heatmap to use
      • getHeatmap

        public Heatmap getHeatmap()
        Returns the underlying heatmap.
        Returns:
        the heatmap, null if none set
      • calculate

        protected void calculate()
        Generates the statistics.
      • getStatisticDescription

        public String getStatisticDescription()
        Returns a description for this statistic.
        Specified by:
        getStatisticDescription in interface adams.data.statistics.InformativeStatistic
        Returns:
        the description
      • statisticNames

        public Iterator<String> statisticNames()
        Returns all the names of the available statistical values.
        Specified by:
        statisticNames in interface adams.data.statistics.InformativeStatistic
        Returns:
        the enumeration of names
      • getStatistic

        public double getStatistic​(String name)
        Returns the statistical value for the given statistic name.
        Specified by:
        getStatistic in interface adams.data.statistics.InformativeStatistic
        Parameters:
        name - the name of the statistical value
        Returns:
        the corresponding value
      • toString

        public String toString()
        Returns a string representation of the statistic.
        Overrides:
        toString in class Object
        Returns:
        the string representation
      • toSpreadSheet

        public adams.data.spreadsheet.SpreadSheet toSpreadSheet()
        Returns the content as spreadsheet.
        Specified by:
        toSpreadSheet in interface adams.data.spreadsheet.SpreadSheetSupporter
        Returns:
        the content