org.jfree.data.general

Interface HeatMapDataset

public interface HeatMapDataset

A dataset that represents a rectangular grid of (x, y, z) values. The x and y values appear at regular intervals in the dataset, while the z-values can take any value (including null for unknown values).

Since: 1.0.13

Method Summary
doublegetMaximumXValue()
Returns the highest x-value represented in this dataset.
doublegetMaximumYValue()
Returns the highest y-value represented in this dataset.
doublegetMinimumXValue()
Returns the lowest x-value represented in this dataset.
doublegetMinimumYValue()
Returns the lowest y-value represented in this dataset.
intgetXSampleCount()
Returns the number of x values across the width of the dataset.
doublegetXValue(int xIndex)
A convenience method that returns the x-value for the given index.
intgetYSampleCount()
Returns the number of y values (or samples) for the dataset.
doublegetYValue(int yIndex)
A convenience method that returns the y-value for the given index.
NumbergetZ(int xIndex, int yIndex)
Returns the z-value at the specified sample position in the dataset.
doublegetZValue(int xIndex, int yIndex)
Returns the z-value at the specified sample position in the dataset.

Method Detail

getMaximumXValue

public double getMaximumXValue()
Returns the highest x-value represented in this dataset. A requirement of this interface is that this method must never return infinite or Double.NAN values.

Returns: The highest x-value represented in this dataset.

getMaximumYValue

public double getMaximumYValue()
Returns the highest y-value represented in this dataset. A requirement of this interface is that this method must never return infinite or Double.NAN values.

Returns: The highest y-value represented in this dataset.

getMinimumXValue

public double getMinimumXValue()
Returns the lowest x-value represented in this dataset. A requirement of this interface is that this method must never return infinite or Double.NAN values.

Returns: The lowest x-value represented in this dataset.

getMinimumYValue

public double getMinimumYValue()
Returns the lowest y-value represented in this dataset. A requirement of this interface is that this method must never return infinite or Double.NAN values.

Returns: The lowest y-value represented in this dataset.

getXSampleCount

public int getXSampleCount()
Returns the number of x values across the width of the dataset. The values are evenly spaced between getMinimumXValue and getMaximumXValue.

Returns: The number of x-values (always > 0).

getXValue

public double getXValue(int xIndex)
A convenience method that returns the x-value for the given index.

Parameters: xIndex the xIndex.

Returns: The x-value.

getYSampleCount

public int getYSampleCount()
Returns the number of y values (or samples) for the dataset. The values are evenly spaced between getMinimumYValue and getMaximumYValue.

Returns: The number of y-values (always > 0).

getYValue

public double getYValue(int yIndex)
A convenience method that returns the y-value for the given index.

Parameters: yIndex the yIndex.

Returns: The y-value.

getZ

public Number getZ(int xIndex, int yIndex)
Returns the z-value at the specified sample position in the dataset. This method can return null to indicate a missing/unknown value.

Bear in mind that the class implementing this interface may store its data using primitives rather than objects, so calling this method may require a new Number object to be allocated... for this reason, it is generally preferable to use the HeatMapDataset method unless you *know* that the dataset implementation stores the z-values using objects.

Parameters: xIndex the position of the x sample in the dataset. yIndex the position of the y sample in the dataset.

Returns: The z-value (possibly null).

getZValue

public double getZValue(int xIndex, int yIndex)
Returns the z-value at the specified sample position in the dataset. For a missing or unknown value, this method should return Double.NAN.

Parameters: xIndex the position of the x sample in the dataset. yIndex the position of the y sample in the dataset.

Returns: The z-value.

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.