

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler uk.ac.leeds.ccg.andyt.gws.core.GWS uk.ac.leeds.ccg.andyt.gws.core.FixedGWS
public class FixedGWS
This class contains methods for generating Grid2DSquareCellDoubles that are spatially weighted statistics known as Fixed Geographically Weighted Statistics (GWS). They are 'fixed' because the spatial scales over which the statistics are generalised is the same for every cell in the grid. Owing to the fixed nature of the scales, there are a number of relevant optimisations for improving memory usage and speed of computation. The task of calculating Fixed GWS can be readily divided by partitioning the result space into discrete chunks and using subsets of the loaded points. By subsetting the points, the points within a fixed distance of a cell centoid may be identified more speedily. Additionally a memory can be stored of which points lie in a somewhat larger region, and this can be used to identify points within a fixed distance of a neighbouring cell centoid more speedily. The optimal way to go about generating results depends as usual on the available memory and processing speed of the computer hardware being used. To really optimise one should consider the inherent parallelism and the utilisation of parallel computing hardware. The optimal amount of division depends on the distance or scale at which the GWS are to be generated, the size of the result, and both of these things relative to the resolution of the result and the amount of available memory. The methods in this class are only concerned with optimising for the result space and points array passed in.
Nested Class Summary 

Nested classes/interfaces inherited from class uk.ac.leeds.ccg.andyt.gws.core.GWS 

GWS.Point2DBigDecimal_DistanceBigDecimal_IDInt, GWS.Point2DDouble_DistanceDouble_IDInt 
Field Summary 

Fields inherited from class uk.ac.leeds.ccg.andyt.gws.core.GWS 

cellsizeDouble, col, grid2DSquareCellProcessor, row, weightFactor, weightIntersect 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler 

handleOutOfMemoryErrorFalse, handleOutOfMemoryErrorTrue, memoryReserve 
Constructor Summary  

FixedGWS()
Default constructor 
Method Summary  

uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(java.util.HashSet pointIDsHashSet,
java.awt.geom.Point2D.Double[] point2DDoubles,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor)
Returns an Grid2DSquareCellDouble that has values corresponding the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor. 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(java.util.HashSet pointIDsHashSet,
java.awt.geom.Point2D.Double[] point2DDoubles,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor,
int distanceFactor)
Returns an Grid2DSquareCellDouble that has values corresponding the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor. 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(java.util.HashSet pointIDsHashSet,
Point2DBigDecimal[] point2DBigDecimals,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor,
int decimalPlaces)
Returns an Grid2DSquareCellDouble that has values corresponding the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor. 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(java.util.HashSet pointIDsHashSet,
Point2DBigDecimal[] point2DBigDecimals,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor,
int distanceFactor,
int decimalPlaces)
Returns an Grid2DSquareCellDouble that has values corresponding the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor. 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(int divisions,
java.awt.geom.Point2D.Double[] point2DDoubles,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor,
int distanceFactor)
Returns an Grid2DSquareCellDouble that has values corresponding the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor. 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(int divisions,
Point2DBigDecimal[] point2DBigDecimals,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor,
int distanceFactor)
Returns an Grid2DSquareCellDouble that has values corresponding to the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor. 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(java.awt.geom.Point2D.Double[] point2DDoubles,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor)
Returns an Grid2DSquareCellDouble that has values corresponding to the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor. 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(java.awt.geom.Point2D.Double[] point2DDoubles,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor,
int distanceFactor)
Returns an Grid2DSquareCellDouble that has values corresponding the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(Point2DBigDecimal[] point2DBigDecimals,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor,
int decimalPlaces)
Returns an Grid2DSquareCellDouble that has values corresponding to the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor. 
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble 
getKernelWeightsInDistance(Point2DBigDecimal[] point2DBigDecimals,
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble,
double distanceDouble,
double weightIntersect,
double weightFactor,
int distanceFactor,
int decimalPlaces)
Returns an Grid2DSquareCellDouble that has values corresponding the sum of kernel weights for a fixed kernel with a radius given by distance and shape given by weightIntersect and weightFactor 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler 

clearMemoryReserve, initMemoryReserve, initMemoryReserve 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public FixedGWS()
Method Detail 

public uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(java.awt.geom.Point2D.Double[] point2DDoubles, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor)
points
 The Point2DBigDecimal[] array to be used.grid2DSquareCellDouble
 The Grid2DSquareCellDouble defining the
frame of the result.distance
 The bandwidth of the fixed kernel.weightIntersect
 The weight at the centre of the kernal.weightFactor
 The distance decay factor of the kernel.public uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(Point2DBigDecimal[] point2DBigDecimals, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor, int decimalPlaces)
points
 The Point2DBigDecimal[] array to be used.grid2DSquareCellDouble
 The Grid2DSquareCellDouble defining the
frame of the result.distance
 The bandwidth of the fixed kernel.weightIntersect
 The weight at the centre of the kernal.weightFactor
 The distance decay factor of the kernel.public uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(java.util.HashSet pointIDsHashSet, java.awt.geom.Point2D.Double[] point2DDoubles, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor)
pointIDsHashSet
 HashSet of Integer key ids of points (a subset)points
 the points array to be usedgrid
 the Grid2DSquareCellDouble defining the frame anddistance
 the bandwidth of the fixed kernelweightIntersect
 the weight at the centre of the kernalweightFactor
 the distance decay factor of the kernelpublic uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(java.util.HashSet pointIDsHashSet, Point2DBigDecimal[] point2DBigDecimals, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor, int decimalPlaces)
pointIDsHashSet
 HashSet of Integer key ids of points (a subset)point2DBigDecimals
 the Point2DBigDecimal[] to be usedgrid
 the Grid2DSquareCellDouble defining the frame anddistance
 the bandwidth of the fixed kernelweightIntersect
 the weight at the centre of the kernalweightFactor
 the distance decay factor of the kernelpublic uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(java.awt.geom.Point2D.Double[] point2DDoubles, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor, int distanceFactor)
points
 the points array to be usedgrid
 the Grid2DSquareCellDouble defining the frame anddistance
 the bandwidth of the fixed kerneldistanceFactor
 is used to calculate searchDistance which is used
to store a memory of what points are in a given distance of a
cell centroid. This memory may be used to calculate the result for
neighbouring cells more speedily. It is recomended that a
distanceFactor is set >= 2.weightIntersect
 the weight at the centre of the kernalweightFactor
 the distance decay factor of the kernelpublic uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(Point2DBigDecimal[] point2DBigDecimals, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor, int distanceFactor, int decimalPlaces)
points
 the points array to be usedgrid
 the Grid2DSquareCellDouble defining the frame anddistance
 the bandwidth of the fixed kerneldistanceFactor
 is used to calculate searchDistance which is used
to store a memory of what points are in a given distance of a
cell centroid. This memory may be used to calculate the result for
neighbouring cells more speedily. It is recomended that a
distanceFactor is set >= 2.weightIntersect
 the weight at the centre of the kernalweightFactor
 the distance decay factor of the kernelpublic uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(java.util.HashSet pointIDsHashSet, java.awt.geom.Point2D.Double[] point2DDoubles, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor, int distanceFactor)
pointIDsHashSet
 HashSet of Integer key ids of points (a subset)points
 the points array to be usedgrid
 the Grid2DSquareCellDouble defining the frame anddistance
 the bandwidth of the fixed kerneldistanceFactor
 is used to calculate searchDistance which is used
to store a memory of what points are in a given distance of a cell
centroid. This memory may be used to calculate the result for
neighbouring cells more speedily. It is recomended that a
distanceFactor is set >= 2.weightIntersect
 the weight at the centre of the kernalweightFactor
 the distance decay factor of the kernelpublic uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(java.util.HashSet pointIDsHashSet, Point2DBigDecimal[] point2DBigDecimals, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor, int distanceFactor, int decimalPlaces)
pointIDsHashSet
 HashSet of Integer key ids of points (a subset)points
 the points array to be usedgrid
 the Grid2DSquareCellDouble defining the frame anddistance
 the bandwidth of the fixed kerneldistanceFactor
 is used to calculate searchDistance which is used
to store a memory of what points are in a given distance of a
cell centroid. This memory may be used to calculate the result for
neighbouring cells more speedily. It is recomended that a
distanceFactor is set >= 2.weightIntersect
 the weight at the centre of the kernalweightFactor
 the distance decay factor of the kernelpublic uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(int divisions, java.awt.geom.Point2D.Double[] point2DDoubles, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor, int distanceFactor)
divisions
 controls the number of times the problem is dividedpoints
 the points array to be usedgrid
 the Grid2DSquareCellDouble defining the frame anddistance
 the bandwidth of the fixed kerneldistanceFactor
 is used to calculate searchDistance which is used
to store a memory of what points are in a given distance of a
cell centroid. This memory may be used to calculate the result for
neighbouring cells more speedily. It is recomended that a
distanceFactor is set >= 2.weightIntersect
 the weight at the centre of the kernalweightFactor
 the distance decay factor of the kernelpublic uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble getKernelWeightsInDistance(int divisions, Point2DBigDecimal[] point2DBigDecimals, uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDouble grid2DSquareCellDouble, double distanceDouble, double weightIntersect, double weightFactor, int distanceFactor)
divisions
 controls the number of times the problem is dividedpoints
 the points array to be usedgrid
 the Grid2DSquareCellDouble defining the frame anddistance
 the bandwidth of the fixed kerneldistanceFactor
 is used to calculate searchDistance which is used
to store a memory of what points are in a given distance of a
cell centroid. This memory may be used to calculate the result for
neighbouring cells more speedily. It is recomended that a
distanceFactor is set >= 2.weightIntersect
 the weight at the centre of the kernalweightFactor
 the distance decay factor of the kernel


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 