Package adams.data.heatmap
Class HeatmapStatistic
- java.lang.Object
-
- adams.data.heatmap.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 Summary
Fields Modifier and Type Field Description static StringCOUNT_MISSINGthe missing value count.static StringCOUNT_NONZEROESthe non-zeroes count.static StringCOUNT_ZEROESthe zeroes count.static StringHEIGHTthe height.protected Heatmapm_Heatmapthe heatmap to create the statistics for.protected Hashtable<String,Double>m_Statisticsthe statistics.static StringMAXIMUMthe maximum value.static StringMINIMUMthe minimum value.static StringWIDTHthe width.
-
Constructor Summary
Constructors Constructor Description HeatmapStatistic()Initializes the statistics.HeatmapStatistic(Heatmap map)Initializes the statistics with the specified heatmap.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcalculate()Generates the statistics.HeatmapgetHeatmap()Returns the underlying heatmap.doublegetStatistic(String name)Returns the statistical value for the given statistic name.StringgetStatisticDescription()Returns a description for this statistic.voidsetHeatmap(Heatmap value)Sets the heatmap to generate the statistics for.Iterator<String>statisticNames()Returns all the names of the available statistical values.adams.data.spreadsheet.SpreadSheettoSpreadSheet()Returns the content as spreadsheet.StringtoString()Returns a string representation of the statistic.
-
-
-
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:
getStatisticDescriptionin interfaceadams.data.statistics.InformativeStatistic- Returns:
- the description
-
statisticNames
public Iterator<String> statisticNames()
Returns all the names of the available statistical values.- Specified by:
statisticNamesin interfaceadams.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:
getStatisticin interfaceadams.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.
-
toSpreadSheet
public adams.data.spreadsheet.SpreadSheet toSpreadSheet()
Returns the content as spreadsheet.- Specified by:
toSpreadSheetin interfaceadams.data.spreadsheet.SpreadSheetSupporter- Returns:
- the content
-
-