Package adams.gui.visualization.core
Class KernelDensityEstimation.RenderState
- java.lang.Object
-
- adams.gui.visualization.core.KernelDensityEstimation.RenderState
-
- Enclosing class:
- KernelDensityEstimation
public static class KernelDensityEstimation.RenderState extends Object
The rendering state.
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,Object>additionalfor storing additional information.doublebinMaxthe largest bin value.doublebinMinthe smallest bin value.double[][]binsthe bins.Color[]colorsthe generated colors.intnumBinsthe number of bins.double[]startXthe starting values for X bins.double[]startYthe starting values for Y bins.doublexMaxthe maximum x value.doublexMinthe minimum x value.doublexRangethe X range.doublexWidththe X bin width.doubleyMaxthe maximum x value.doubleyMinthe minimum x value.doubleyRangethe Y range.doubleyWidththe Y bin width.
-
Constructor Summary
Constructors Constructor Description RenderState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColor(double x, double y)Returns the color to use for the data point.doublegetDensity(double x, double y)Returns the density for the data point.intgetIndex(double x, double y)Returns the color index for the data point.
-
-
-
Field Detail
-
colors
public Color[] colors
the generated colors.
-
numBins
public int numBins
the number of bins.
-
bins
public double[][] bins
the bins.
-
startX
public double[] startX
the starting values for X bins.
-
startY
public double[] startY
the starting values for Y bins.
-
binMin
public double binMin
the smallest bin value.
-
binMax
public double binMax
the largest bin value.
-
xMin
public double xMin
the minimum x value.
-
xMax
public double xMax
the maximum x value.
-
yMin
public double yMin
the minimum x value.
-
yMax
public double yMax
the maximum x value.
-
xWidth
public double xWidth
the X bin width.
-
yWidth
public double yWidth
the Y bin width.
-
xRange
public double xRange
the X range.
-
yRange
public double yRange
the Y range.
-
-
Method Detail
-
getDensity
public double getDensity(double x, double y)Returns the density for the data point.- Parameters:
x- the x coordinatey- the y coordinate- Returns:
- the density
-
getIndex
public int getIndex(double x, double y)Returns the color index for the data point.- Parameters:
x- the x coordinatey- the y coordinate- Returns:
- the color
-
getColor
public Color getColor(double x, double y)
Returns the color to use for the data point.- Parameters:
x- the x coordinatey- the y coordinate- Returns:
- the color
-
-