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 String
COUNT_MISSING
the missing value count.static String
COUNT_NONZEROES
the non-zeroes count.static String
COUNT_ZEROES
the zeroes count.static String
HEIGHT
the height.protected Heatmap
m_Heatmap
the heatmap to create the statistics for.protected Hashtable<String,Double>
m_Statistics
the statistics.static String
MAXIMUM
the maximum value.static String
MINIMUM
the minimum value.static String
WIDTH
the 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 void
calculate()
Generates the statistics.Heatmap
getHeatmap()
Returns the underlying heatmap.double
getStatistic(String name)
Returns the statistical value for the given statistic name.String
getStatisticDescription()
Returns a description for this statistic.void
setHeatmap(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.SpreadSheet
toSpreadSheet()
Returns the content as spreadsheet.String
toString()
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:
getStatisticDescription
in interfaceadams.data.statistics.InformativeStatistic
- Returns:
- the description
-
statisticNames
public Iterator<String> statisticNames()
Returns all the names of the available statistical values.- Specified by:
statisticNames
in 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:
getStatistic
in 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:
toSpreadSheet
in interfaceadams.data.spreadsheet.SpreadSheetSupporter
- Returns:
- the content
-
-