## org.jfree.data.contour
Class NonGridContourDataset

    java.lang.Object
      org.jfree.data.general.AbstractDataset
          org.jfree.data.general.AbstractSeriesDataset
              org.jfree.data.xy.AbstractXYDataset
                  org.jfree.data.xy.AbstractXYZDataset
                      org.jfree.data.contour.DefaultContourDataset
                          org.jfree.data.contour.NonGridContourDataset

All Implemented Interfaces:
  java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, ContourDataset, Dataset, SeriesChangeListener, SeriesDataset, XYDataset, XYZDataset

    public class NonGridContourDataset

extends DefaultContourDataset

A convenience class that extends the `DefaultContourDataset` to accommodate non-grid data.

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.jfree.data.contour.DefaultContourDataset
`seriesName, xIndex, xValues, yValues, zValues`

Constructor Summary
`NonGridContourDataset()` Default constructor.
`NonGridContourDataset(java.lang.String seriesName, java.lang.Object[] xData, java.lang.Object[] yData, java.lang.Object[] zData)` Constructor for NonGridContourDataset.
`NonGridContourDataset(java.lang.String seriesName, java.lang.Object[] xData, java.lang.Object[] yData, java.lang.Object[] zData, int numX, int numY, int power)` Constructor for NonGridContourDataset.

Method Summary
`protected void` `buildGrid(int numX, int numY, int power)` Builds a regular grid.
`protected double` `distance(double xDataPt, double yDataPt, double xGrdPt, double yGrdPt)` Calculates the distance between two points.

Methods inherited from class org.jfree.data.contour.DefaultContourDataset
`formObjectArray, formObjectArray, getItemCount, getMaxZValue, getMinZValue, getMinZValue, getSeriesCount, getSeriesName, getX, getXIndices, getXValue, getXValues, getY, getYValues, getZ, getZValueRange, getZValues, indexX, indexX, indexY, indexZ, initialize, isDateAxis, setSeriesNames`

Methods inherited from class org.jfree.data.xy.AbstractXYZDataset
`getZValue`

Methods inherited from class org.jfree.data.xy.AbstractXYDataset
`getDomainOrder, getXValue, getYValue`

Methods inherited from class org.jfree.data.general.AbstractSeriesDataset
`seriesChanged`

Methods inherited from class org.jfree.data.general.AbstractDataset
`addChangeListener, clone, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup, validateObject`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jfree.data.xy.XYZDataset
`getZValue`

Methods inherited from interface org.jfree.data.xy.XYDataset
`getDomainOrder, getXValue, getYValue`

Methods inherited from interface org.jfree.data.general.Dataset
`addChangeListener, getGroup, removeChangeListener, setGroup`

Constructor Detail

### NonGridContourDataset

    public NonGridContourDataset()

  Default constructor.

### NonGridContourDataset

    public NonGridContourDataset(java.lang.String seriesName,
                                 java.lang.Object[] xData,
                                 java.lang.Object[] yData,
                                 java.lang.Object[] zData)

  Constructor for NonGridContourDataset. Uses default values for grid dimensions and weighting.

  Parameters:
    `seriesName` - the series name.
    `xData` - the x values.
    `yData` - the y values.
    `zData` - the z values.

### NonGridContourDataset

    public NonGridContourDataset(java.lang.String seriesName,
                                 java.lang.Object[] xData,
                                 java.lang.Object[] yData,
                                 java.lang.Object[] zData,
                                 int numX,
                                 int numY,
                                 int power)

  Constructor for NonGridContourDataset.

  Parameters:
    `seriesName` - the series name.
    `xData` - the x values.
    `yData` - the y values.
    `zData` - the z values.
    `numX` - number grid cells in along the x-axis
    `numY` - number grid cells in along the y-axis
    `power` - exponent for inverse distance weighting

Method Detail

### buildGrid

    protected void buildGrid(int numX,
                             int numY,
                             int power)

  Builds a regular grid. Maps the non-grid data into the regular grid using an inverse distance between grid and non-grid points. Weighting of distance can be controlled by setting through the power parameter that controls the exponent used on the distance weighting (e.g., distance^power).

  Parameters:
    `numX` - number grid points in along the x-axis
    `numY` - number grid points in along the y-axis
    `power` - exponent for inverse distance weighting

### distance

    protected double distance(double xDataPt,
                              double yDataPt,
                              double xGrdPt,
                              double yGrdPt)

  Calculates the distance between two points.

  Parameters:
    `xDataPt` - the x coordinate.
    `yDataPt` - the y coordinate.
    `xGrdPt` - the x grid coordinate.
    `yGrdPt` - the y grid coordinate.
  Returns:
    The distance between two points.