uk.ac.leeds.ccg.andyt.grids.utilities
Class Kernel

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.utilities.Kernel

public abstract class Kernel
extends java.lang.Object

Class of methods to do with kernels.


Constructor Summary
Kernel()
           
 
Method Summary
static double getAdaptiveKernelWeight(double distance, double bandwidth, double sumWeights, int precision, double weightIntersect, double weightFactor)
          Returns a double representing an adaptive kernel weight.
static double[] getKernelParameters(Grid2DSquareCellAbstract grid2DSquareCell, int cellDistance, double distance, double weightIntersect, double weightFactor)
          Returns double[] result of kernel parameters where: result[0] = The total sum of all the weights for a given kernel; result[1] = The total number of cells thats centroids are within distance of an arbitrary cell centroid of grid2DSquareCell.
static double getKernelVolume(double bandwidth, int precision, double weightIntersect, double weightFactor)
          Returns a double representing the kernel volume.
static double getKernelWeight(double distance, double weightIntersect, double weightFactor, double thisDistance)
          Returns a double value for the height of a kernel at thisDistance from the centre of a kernel with; Bandwidth distance, weight at the centre of weightIntersect and distance decay of weightFactor.
static double[][] getKernelWeights(Grid2DSquareCellAbstract grid2DSquareCell, double distance, double weightIntersect, double weightFactor)
          Returns a double[] of kernel weights.
static double[] getKernelWeights(Grid2DSquareCellAbstract grid2DSquareCell, long rowIndex, long colIndex, double distance, double weightIntersect, double weightFactor, java.awt.geom.Point2D.Double[] points)
          Returns a double[] of kernel weights.
static double[] getKernelWeights(java.awt.geom.Point2D.Double centroid, double distance, double weightIntersect, double weightFactor, java.awt.geom.Point2D.Double[] points)
          Returns double[] result of kernel weights.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Kernel

public Kernel()
Method Detail

getKernelWeight

public static double getKernelWeight(double distance,
                                     double weightIntersect,
                                     double weightFactor,
                                     double thisDistance)
Returns a double value for the height of a kernel at thisDistance from the centre of a kernel with; Bandwidth distance, weight at the centre of weightIntersect and distance decay of weightFactor.

Parameters:
distance -
weightIntersect -
weightFactor - Warning: If weightfactor is < 1.0d strange things could be happening!!!!

getKernelWeights

public static double[][] getKernelWeights(Grid2DSquareCellAbstract grid2DSquareCell,
                                          double distance,
                                          double weightIntersect,
                                          double weightFactor)
Returns a double[] of kernel weights.

Parameters:
grid2DSquareCell -
distance -
weightIntersect -
weightFactor -

getKernelWeights

public static double[] getKernelWeights(Grid2DSquareCellAbstract grid2DSquareCell,
                                        long rowIndex,
                                        long colIndex,
                                        double distance,
                                        double weightIntersect,
                                        double weightFactor,
                                        java.awt.geom.Point2D.Double[] points)
Returns a double[] of kernel weights.

Parameters:
grid2DSquareCell -
rowIndex -
colIndex -
distance -
weightIntersect -
weightFactor -
points -

getKernelWeights

public static double[] getKernelWeights(java.awt.geom.Point2D.Double centroid,
                                        double distance,
                                        double weightIntersect,
                                        double weightFactor,
                                        java.awt.geom.Point2D.Double[] points)
Returns double[] result of kernel weights.

Parameters:
centroid -
distance -
weightIntersect -
weightFactor -
points -

getKernelParameters

public static double[] getKernelParameters(Grid2DSquareCellAbstract grid2DSquareCell,
                                           int cellDistance,
                                           double distance,
                                           double weightIntersect,
                                           double weightFactor)
Returns double[] result of kernel parameters where: result[0] = The total sum of all the weights for a given kernel; result[1] = The total number of cells thats centroids are within distance of an arbitrary cell centroid of grid2DSquareCell.

Parameters:
grid2DSquareCell - Grid2DSquareCellAbstract for which kernel parameters are returned
cellDistance -
distance -
weightIntersect -
weightFactor -

getAdaptiveKernelWeight

public static double getAdaptiveKernelWeight(double distance,
                                             double bandwidth,
                                             double sumWeights,
                                             int precision,
                                             double weightIntersect,
                                             double weightFactor)
Returns a double representing an adaptive kernel weight.

Parameters:
distance -
bandwidth -
sumWeights -
precision -
weightIntersect -
weightFactor -

getKernelVolume

public static double getKernelVolume(double bandwidth,
                                     int precision,
                                     double weightIntersect,
                                     double weightFactor)
Returns a double representing the kernel volume.

Parameters:
bandwidth -
precision -
weightIntersect -
weightFactor -