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)
           
static double[] getKernelParameters(Grid2DSquareCellDouble grid0, int grid0CellDistance, double distance, double weightIntersect, double weightFactor)
          Returns double[] result: double[0] the total sum of all the weights for a given kernel double[1] the total number of cells thats centroids are within distance of an arbitrary cell centroid of grid0
static double getKernelVolume(double bandwidth, int precision, double weightIntersect, double weightFactor)
           
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(Grid2DSquareCellDouble grid, double distance, double weightIntersect, double weightFactor)
          Returns a double[][] of values for a kernel
static double[] getKernelWeights(Grid2DSquareCellDouble grid, long rowIndex, long colIndex, double distance, double weightIntersect, double weightFactor, java.awt.geom.Point2D.Double[] points)
          Returns a double[] of values for a kernel TODO: document
static double[] getKernelWeights(java.awt.geom.Point2D.Double centroid, double distance, double weightIntersect, double weightFactor, java.awt.geom.Point2D.Double[] points)
          TODO: document
 
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. TODO: If weightfactor is < 1.0 strange things could be happening!!!!


getKernelWeights

public static double[][] getKernelWeights(Grid2DSquareCellDouble grid,
                                          double distance,
                                          double weightIntersect,
                                          double weightFactor)
Returns a double[][] of values for a kernel


getKernelWeights

public static double[] getKernelWeights(Grid2DSquareCellDouble grid,
                                        long rowIndex,
                                        long colIndex,
                                        double distance,
                                        double weightIntersect,
                                        double weightFactor,
                                        java.awt.geom.Point2D.Double[] points)
Returns a double[] of values for a kernel TODO: document

Parameters:
grid -

getKernelWeights

public static double[] getKernelWeights(java.awt.geom.Point2D.Double centroid,
                                        double distance,
                                        double weightIntersect,
                                        double weightFactor,
                                        java.awt.geom.Point2D.Double[] points)
TODO: document


getKernelParameters

public static double[] getKernelParameters(Grid2DSquareCellDouble grid0,
                                           int grid0CellDistance,
                                           double distance,
                                           double weightIntersect,
                                           double weightFactor)
Returns double[] result: double[0] the total sum of all the weights for a given kernel double[1] the total number of cells thats centroids are within distance of an arbitrary cell centroid of grid0

Parameters:
grid0 -
grid0CellDistance -
distance -
weightIntersect -
weightFactor -

getAdaptiveKernelWeight

public static double getAdaptiveKernelWeight(double distance,
                                             double bandwidth,
                                             double sumWeights,
                                             int precision,
                                             double weightIntersect,
                                             double weightFactor)

getKernelVolume

public static double getKernelVolume(double bandwidth,
                                     int precision,
                                     double weightIntersect,
                                     double weightFactor)