adams.data.heatmap
Class HeatmapStatistic

java.lang.Object
  extended by adams.data.heatmap.HeatmapStatistic
All Implemented Interfaces:
InformativeStatistic

public class HeatmapStatistic
extends Object
implements InformativeStatistic

Generates some statistics for a heatmap.

Version:
$Revision: 6027 $
Author:
fracpete (fracpete at waikato dot ac dot nz)

Field Summary
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
HeatmapStatistic()
          Initializes the statistics.
HeatmapStatistic(Heatmap map)
          Initializes the statistics with the specified heatmap.
 
Method Summary
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.
 Enumeration<String> statisticNames()
          Returns all the names of the available statistical values.
 String toString()
          Returns a string representation of the statistic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.


m_Statistics

protected Hashtable<String,Double> m_Statistics
the statistics.


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 InformativeStatistic
Returns:
the description

statisticNames

public Enumeration<String> statisticNames()
Returns all the names of the available statistical values.

Specified by:
statisticNames in interface 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 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


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.