|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.leeds.ccg.andyt.grids.core.OutOfMemoryErrorHandler
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellAbstract
public abstract class Grid2DSquareCellAbstract
Contains CellID and ChunkID classes, referencing and general geometry methods. It also controls what methods extended classes must implement acting like an interface. The basic geometries are ordered in set numbers of rows and columns and are arranged sequentially as their base two-dimensional orthogonal coordinate axes. The sequential arrangement goes along the x-axis row by row from the y-axis, then up the y-axis taking each row in turn. TODO: Handling for NumberFormatExceptions and ArithmeticExceptions in calculations
Nested Class Summary | |
---|---|
static class |
Grid2DSquareCellAbstract.CellID
A simple CellID class for distinguishing cells. |
static class |
Grid2DSquareCellAbstract.ChunkID
A simple ChunkID class for distinguishing chunks. |
Field Summary | |
---|---|
protected int |
chunkNcols
For storing the (usual) number of columns of cells in a chunk. |
protected int |
chunkNrows
For storing the (usual) number of rows of cells in a chunk. |
protected java.math.BigDecimal[] |
dimensions
For storing cellsize, minx, miny, maxx, maxy. |
protected int |
dimensionsScale
For storing the minimum number of decimal places used to store dimensions. |
protected java.io.File |
directory
Local directory used for caching. |
protected java.util.HashMap |
grid2DSquareCellChunks
The Grid2DSquareCellChunkAbstract data cache. |
protected java.util.HashSet |
grid2DSquareCells
A HashMap of swappable objects that may be juggled to release memory for processing |
protected GridStatisticsAbstract |
gridStatistics
A reference to the grid Statistics Object. |
protected java.lang.String |
name
For storing the name of the grid. |
protected int |
nChunkCols
For storing the number of chunk columns. |
protected int |
nChunkRows
For storing the number of chunk rows. |
protected long |
ncols
For storing the number of columns in the grid. |
protected long |
nrows
For storing the number of rows in the grid. |
protected static UnsignedLongPowersOf2 |
unsignedLongPowersOf2
For storing individual locations mapped to a binary encoded long. |
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.core.OutOfMemoryErrorHandler |
---|
handleOutOfMemoryErrorFalse, handleOutOfMemoryErrorTrue, memoryReserve |
Constructor Summary | |
---|---|
Grid2DSquareCellAbstract()
|
Method Summary | |
---|---|
protected void |
clearFromCacheGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID)
For releasing a grid2DSquareCellChunk stored in memory. |
protected void |
clearFromCacheGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
For releasing a grid2DSquareCellChunk stored in memory. |
protected void |
clearFromCacheGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
For releasing a grid2DSquareCellChunk stored in memory except that with ChunkID given by chunkID. |
protected void |
clearFromCacheGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
For releasing a grid2DSquareCellChunk stored in memory except that with ChunkID given by chunkID. |
protected void |
clearFromCacheGrid2DSquareCellChunks()
For releasing all Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks. |
protected void |
clearFromCacheGrid2DSquareCellChunks(boolean handleOutOfMemoryError)
For releasing all Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks. |
protected void |
clearFromCacheGrid2DSquareCellChunks(java.util.HashSet chunkIDs)
Clears Grid2DSquareCellChunkAbstracts with ChunkIDs in chunkIDs. |
protected void |
clearFromCacheGrid2DSquareCellChunks(java.util.HashSet chunkIDs,
boolean handleOutOfMemoryError)
Clears Grid2DSquareCellChunkAbstracts with ChunkIDs in chunkIDs. |
protected void |
clearFromCacheGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
For releasing all grid2DSquareCellChunk stored in memory except that with ChunkID given by chunkID. |
protected void |
clearFromCacheGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
For releasing all grid2DSquareCellChunk stored in memory except that with ChunkID given by chunkID. |
protected void |
clearFromCacheGrid2DSquareCellChunksExcept(java.util.HashSet chunkIDs)
For releasing all grid2DSquareCellChunk stored in memory except those with ChunkIDs in chunkIDs. |
protected void |
clearFromCacheGrid2DSquareCellChunksExcept(java.util.HashSet chunkIDs,
boolean handleOutOfMemoryError)
For releasing all grid2DSquareCellChunk stored in memory except those with ChunkIDs in chunkIDs. |
protected java.lang.String |
getBasicDescription()
Returns a basic description of this instance. |
java.lang.String |
getBasicDescription(boolean handleOutOfMemoryError)
Returns a basic description of this instance. |
protected double[] |
getCellBoundsDoubleArray(double x,
double y)
Returns double[] where; double[0] xmin, left most x-coordinate of cell that intersects point at (x,y) double[1] ymin, lowest y-coordinate of cell that intersects point at (x,y) double[2] xmax, right most x-coordinate of cell that intersects point at (x,y) double[3] ymax, highest y-coordinate of cell that intersects point at (x,y) |
double[] |
getCellBoundsDoubleArray(double x,
double y,
boolean handleOutOfMemoryError)
Returns double[] where; double[0] xmin, left most x-coordinate of cell that intersects point at (x,y) double[1] ymin, lowest y-coordinate of cell that intersects point at (x,y) double[2] xmax, right most x-coordinate of cell that intersects point at (x,y) double[3] ymax, highest y-coordinate of cell that intersects point at (x,y) |
protected double[] |
getCellBoundsDoubleArray(long cellRowIndex,
long cellColIndex)
Returns double[] where; double[0] xmin, left most x-coordinate of cell at (rowIndex,colIndex) double[1] ymin, lowest y-coordinate of cell at (rowIndex,colIndex) double[2] xmax, right most x-coordinate of cell at (rowIndex,colIndex) double[3] ymax, highest y-coordinate of cell at (rowIndex,colIndex) |
double[] |
getCellBoundsDoubleArray(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns double[] where; double[0] xmin, left most x-coordinate of cell at (rowIndex,colIndex) double[1] ymin, lowest y-coordinate of cell at (rowIndex,colIndex) double[2] xmax, right most x-coordinate of cell at (rowIndex,colIndex) double[3] ymax, highest y-coordinate of cell at (rowIndex,colIndex) |
protected long |
getCellColIndex(java.math.BigDecimal xBigDecimal)
Returns the cell column Index for the cell column that intersect the x-coordinate xBigDecimal. |
long |
getCellColIndex(java.math.BigDecimal xBigDecimal,
boolean handleOutOfMemoryError)
Returns the cell column Index for the cell column that intersect the x-coordinate xBigDecimal. |
protected long |
getCellColIndex(double x)
Returns the cell column Index for the cell column that intersect the x-coordinate x. |
long |
getCellColIndex(double x,
boolean handleOutOfMemoryError)
Returns the cell column Index for the cell column that intersect the x-coordinate x. |
protected long |
getCellColIndex(int chunkColIndex,
int chunkCellColIndex)
Returns the cell column index for the cells in chunk column index chunkColIndex chunk cell column index chunkCellColIndex. |
long |
getCellColIndex(int chunkColIndex,
int chunkCellColIndex,
boolean handleOutOfMemoryError)
Returns the cell column index for the cells in chunk column index chunkColIndex chunk cell column index chunkCellColIndex. |
protected double |
getCellDouble(double x,
double y)
Returns Grid2DSquareCellChunkAbstract cell value at at point given by x-coordinate x and y-coordinate y as a double. |
double |
getCellDouble(double x,
double y,
boolean handleOutOfMemoryError)
Returns Grid2DSquareCellChunkAbstract cell value at at point given by x-coordinate x and y-coordinate y as a double. |
protected double |
getCellDouble(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk,
int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex)
Returns the cell value at chunk cell row index chunkCellRowIndex, chunk cell col index chunkCellColIndex of Grid2DSquareCellChunkAbstract given by chunk row index chunkRowIndex, chunk col index chunkColIndex as a double. |
double |
getCellDouble(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk,
int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex,
boolean handleOutOfMemoryError)
Returns the cell value at chunk cell row index chunkCellRowIndex, chunk cell col index chunkCellColIndex of Grid2DSquareCellChunkAbstract given by chunk row index chunkRowIndex, chunk col index chunkColIndex as a double. |
protected double |
getCellDouble(int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex)
Returns Grid2DSquareCellChunkAbstract cell value at cell row index equal to cellRowIndex, cell col index equal to cellColIndex as a double. |
double |
getCellDouble(int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex,
boolean handleOutOfMemoryError)
Returns Grid2DSquareCellChunkAbstract cell value at cell row index equal to cellRowIndex, cell col index equal to cellColIndex as a double. |
protected double |
getCellDouble(long cellRowIndex,
long cellColIndex)
Returns Grid2DSquareCellChunkAbstract cell value at cell row index equal to cellRowIndex, cell col index equal to cellColIndex as a double. |
double |
getCellDouble(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns Grid2DSquareCellChunkAbstract cell value at cell row index equal to cellRowIndex, cell col index equal to cellColIndex as a double. |
protected double |
getCellDouble(java.awt.geom.Point2D.Double point)
Returns Grid2DSquareCellChunkAbstract cell value at at Point2D.Double point as a double. |
double |
getCellDouble(java.awt.geom.Point2D.Double point,
boolean handleOutOfMemoryError)
Returns Grid2DSquareCellChunkAbstract cell value at at Point2D.Double point as a double. |
protected Grid2DSquareCellAbstract.CellID |
getCellID(double x,
double y)
Returns a CellID of the cell given by x-coordinate x, y-coordinate y even if that cell would not be in the grid. |
Grid2DSquareCellAbstract.CellID |
getCellID(double x,
double y,
boolean handleOutOfMemoryError)
Returns a CellID of the cell given by x-coordinate x, y-coordinate y even if that cell would not be in the grid. |
protected Grid2DSquareCellAbstract.CellID |
getCellID(long cellRowIndex,
long cellColIndex)
Returns a new CellID of the cell given by cell row index cellRowIndex, cell column index cellColIndex. |
Grid2DSquareCellAbstract.CellID |
getCellID(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns a new CellID of the cell given by cell row index cellRowIndex, cell column index cellColIndex. |
protected Grid2DSquareCellAbstract.CellID[] |
getCellIDs(double x,
double y,
double distance)
Returns a CellID[] - the cell IDs for cells thats centroids are intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance. |
Grid2DSquareCellAbstract.CellID[] |
getCellIDs(double x,
double y,
double distance,
boolean handleOutOfMemoryError)
Returns a CellID[] - the cell IDs for cells thats centroids are intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance. |
protected Grid2DSquareCellAbstract.CellID[] |
getCellIDs(double x,
double y,
long cellRowIndex,
long cellColIndex,
double distance)
Returns double[] cells - the values for cells thats centroids would be intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance. |
Grid2DSquareCellAbstract.CellID[] |
getCellIDs(double x,
double y,
long cellRowIndex,
long cellColIndex,
double distance,
boolean handleOutOfMemoryError)
Returns double[] cells - the values for cells thats centroids would be intersected by circle with centre at x-coordinate x, y-coordinate y, and radius distance. |
protected Grid2DSquareCellAbstract.CellID[] |
getCellIDs(long cellRowIndex,
long cellColIndex,
double distance)
Returns a CellID[] - the cell IDs for cells thats centroids would be intersected by circle with centre at centroid of cell given by cell row index cellRowIndex, cell column index cellColIndex, and radius distance. |
Grid2DSquareCellAbstract.CellID[] |
getCellIDs(long cellRowIndex,
long cellColIndex,
double distance,
boolean handleOutOfMemoryError)
Returns a CellID[] - the cell IDs for cells thats centroids would be intersected by circle with centre at centroid of cell given by cell row index cellRowIndex, cell column index cellColIndex, and radius distance. |
protected int |
getCellInt(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk,
int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex)
Returns the cell value at chunk cell row index chunkCellRowIndex, chunk cell col index chunkCellColIndex of Grid2DSquareCellChunkAbstract given by chunk row index chunkRowIndex, chunk col index chunkColIndex as a int. |
int |
getCellInt(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk,
int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex,
boolean handleOutOfMemoryError)
Returns the cell value at chunk cell row index chunkCellRowIndex, chunk cell col index chunkCellColIndex of Grid2DSquareCellChunkAbstract given by chunk row index chunkRowIndex, chunk col index chunkColIndex as a int. |
protected int |
getCellInt(int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex)
Returns the cell value at chunk cell row index chunkCellRowIndex, chunk cell col index chunkCellColIndex of Grid2DSquareCellChunkAbstract given by chunk row index chunkRowIndex, chunk col index chunkColIndex as a int. |
int |
getCellInt(int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex,
boolean handleOutOfMemoryError)
Returns the cell value at chunk cell row index chunkCellRowIndex, chunk cell col index chunkCellColIndex of Grid2DSquareCellChunkAbstract given by chunk row index chunkRowIndex, chunk col index chunkColIndex as a int. |
protected int |
getCellInt(long cellRowIndex,
long cellColIndex)
Returns Grid2DSquareCellChunkAbstract cell value at cell row index equal to cellRowIndex, cell col index equal to cellColIndex as a int. |
int |
getCellInt(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns Grid2DSquareCellChunkAbstract cell value at cell row index equal to cellRowIndex, cell col index equal to cellColIndex as a int. |
protected long |
getCellRowIndex(java.math.BigDecimal yBigDecimal)
Returns the cell row Index for the cells that intersect the line with y-coordinate yBigDecimal. |
long |
getCellRowIndex(java.math.BigDecimal yBigDecimal,
boolean handleOutOfMemoryError)
Returns the cell row Index for the cells that intersect the line with y-coordinate yBigDecimal. |
protected long |
getCellRowIndex(double y)
Returns the cell row Index for the cells that intersect the line with y-coordinate y. |
long |
getCellRowIndex(double y,
boolean handleOutOfMemoryError)
Returns the cell row Index for the cells that intersect the line with y-coordinate y. |
protected long |
getCellRowIndex(int chunkRowIndex,
int chunkCellRowIndex)
Returns the cell column index for the cells in chunk column index chunkColIndex chunk cell column index chunkCellColIndex. |
long |
getCellRowIndex(int chunkRowIndex,
int chunkCellRowIndex,
boolean handleOutOfMemoryError)
Returns the cell row index for the cells in chunk row index chunkRowIndex chunk cell row index chunkCellRowIndex. |
double |
getCellsizeDouble(boolean handleOutOfMemoryError)
Returns a double equal to this.dimensions[0].doubleValue. |
protected java.math.BigDecimal |
getCellXBigDecimal(Grid2DSquareCellAbstract.CellID cellID)
Returns the x-coordinate of the centroid for cell with cell ID cellID as a BigDecimal. |
java.math.BigDecimal |
getCellXBigDecimal(Grid2DSquareCellAbstract.CellID cellID,
boolean handleOutOfMemoryError)
Returns the x-coordinate of the centroid for cell with cell ID cellID as a BigDecimal. |
java.math.BigDecimal |
getCellXBigDecimal(Grid2DSquareCellAbstract.CellID cellID,
int chunkRowIndex,
int chunkColIndex)
Returns the x-coordinate of the centroid of cell with CellID cellID as a getCellXBigDecimal. |
protected java.math.BigDecimal |
getCellXBigDecimal(long cellColIndex)
Returns the x-coordinate of the centroid for cells with column index cellColIndex as a BigDecimal. |
java.math.BigDecimal |
getCellXBigDecimal(long cellColIndex,
boolean handleOutOfMemoryError)
Returns the x-coordinate of the centroid for cells with column index cellColIndex as a BigDecimal. |
java.math.BigDecimal |
getCellXBigDecimal(long cellColIndex,
int chunkRowIndex,
int chunkColIndex)
Returns the x-coordinate of the centroid for cells with column index cellColIndex as a BigDecimal. |
protected double |
getCellXDouble(Grid2DSquareCellAbstract.CellID cellID)
Returns the x-coordinate of the centroid for cell with cell ID cellID as a double |
double |
getCellXDouble(Grid2DSquareCellAbstract.CellID cellID,
boolean handleOutOfMemoryError)
Returns the x-coordinate of the centroid for cell with cell ID cellID as a double |
double |
getCellXDouble(Grid2DSquareCellAbstract.CellID cellID,
int chunkRowIndex,
int chunkColIndex)
Returns the x-coordinate of the centroid of cell with CellID cellID as a double. |
protected double |
getCellXDouble(int chunkCellColIndex,
int chunkColIndex)
Returns the x-coordinate of the centroid for cells with column index cellColIndex as a double. |
double |
getCellXDouble(int chunkCellColIndex,
int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
Returns the x-coordinate of the centroid for cells with column index cellColIndex as a double. |
protected double |
getCellXDouble(long cellColIndex)
Returns the x-coordinate of the centroid for cells with column index cellColIndex as a double. |
double |
getCellXDouble(long cellColIndex,
boolean handleOutOfMemoryError)
Returns the x-coordinate of the centroid for cells with column index cellColIndex as a double. |
protected java.math.BigDecimal |
getCellYBigDecimal(Grid2DSquareCellAbstract.CellID cellID)
Returns the y-coordinate of the centroid of cell with CellID cellID as a BigDecimal. |
java.math.BigDecimal |
getCellYBigDecimal(Grid2DSquareCellAbstract.CellID cellID,
boolean handleOutOfMemoryError)
Returns the y-coordinate of the centroid of cell with CellID cellID as a BigDecimal. |
java.math.BigDecimal |
getCellYBigDecimal(Grid2DSquareCellAbstract.CellID cellID,
int chunkRowIndex,
int chunkColIndex)
Returns the y-coordinate of the centroid of cell with CellID cellID as a BigDecimal. |
protected java.math.BigDecimal |
getCellYBigDecimal(long cellRowIndex)
Returns the y-coordinate of the centroid for cells with row index cellRowIndex as a BigDecimal. |
java.math.BigDecimal |
getCellYBigDecimal(long cellRowIndex,
boolean handleOutOfMemoryError)
Returns the y-coordinate of the centroid for cells with row index cellRowIndex as a BigDecimal. |
java.math.BigDecimal |
getCellYBigDecimal(long cellRowIndex,
int chunkRowIndex,
int chunkColIndex)
Returns the y-coordinate of the centroid for cells with row index cellRowIndex as a BigDecimal. |
protected double |
getCellYDouble(Grid2DSquareCellAbstract.CellID cellID)
Returns the y-coordinate of the centroid of cell with CellID cellID as a double. |
double |
getCellYDouble(Grid2DSquareCellAbstract.CellID cellID,
boolean handleOutOfMemoryError)
Returns the y-coordinate of the centroid of cell with CellID cellID as a double. |
double |
getCellYDouble(Grid2DSquareCellAbstract.CellID cellID,
int chunkRowIndex,
int chunkColIndex)
Returns the y-coordinate of the centroid of cell with CellID cellID as a double. |
protected double |
getCellYDouble(int chunkCellRowIndex,
int chunkRowIndex)
Returns the y-coordinate of the centroid for cells with row index cellRowIndex as a double. |
double |
getCellYDouble(int chunkCellRowIndex,
int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
Returns the y-coordinate of the centroid for cells with row index cellRowIndex as a double. |
protected double |
getCellYDouble(long cellRowIndex)
Returns the y-coordinate of the centroid for cells with row index cellRowIndex as a double. |
double |
getCellYDouble(long cellRowIndex,
boolean handleOutOfMemoryError)
Returns the y-coordinate of the centroid for cells with row index cellRowIndex as a double. |
protected int |
getChunkCellColIndex(double x)
Returns the chunk cell column Index of the cells that intersect the x-coordinate x. |
int |
getChunkCellColIndex(double x,
boolean handleOutOfMemoryError)
Returns the chunk cell column Index of the cells that intersect the x-coordinate x. |
protected int |
getChunkCellColIndex(long cellColIndex)
Returns the chunk cell column index of the cells in the cell column index cellColIndex. |
int |
getChunkCellColIndex(long cellColIndex,
boolean handleOutOfMemoryError)
Returns the chunk cell column index of the cells in the cell column index cellColIndex. |
protected int |
getChunkCellRowIndex(double y)
Returns the chunk cell row Index of the cells that intersects the line with y-coordinate y. |
int |
getChunkCellRowIndex(double y,
boolean handleOutOfMemoryError)
Returns the chunk cell row Index of the cells that intersects the line with y-coordinate y. |
protected int |
getChunkCellRowIndex(long cellRowIndex)
Returns the chunk cell row index of the cells with cell row index equal to cellRowIndex. |
int |
getChunkCellRowIndex(long cellRowIndex,
boolean handleOutOfMemoryError)
Returns the chunk cell row index of the cells with cell row index equal to cellRowIndex. |
protected int |
getChunkColIndex(double x)
Returns the chunk column index for the Grid2DSquareCellChunkAbstract intersecting the x-coordinate x. |
int |
getChunkColIndex(double x,
boolean handleOutOfMemoryError)
Returns the chunk column index for the Grid2DSquareCellChunkAbstract intersecting the x-coordinate x. |
protected int |
getChunkColIndex(long cellColIndex)
Returns the chunk column index for the Grid2DSquareCellChunkAbstract intersecting the cell column index cellColIndex. |
int |
getChunkColIndex(long cellColIndex,
boolean handleOutOfMemoryError)
Returns the chunk column index for the Grid2DSquareCellChunkAbstract intersecting the cell column index cellColIndex. |
int |
getChunkNcols(boolean handleOutOfMemoryError)
Returns this.chunkNcols. |
protected int |
getChunkNcols(Grid2DSquareCellAbstract.ChunkID chunkID)
Returns chunkNcols, the number of columns in Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID |
int |
getChunkNcols(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Returns chunkNcols, the number of columns in Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID |
protected int |
getChunkNcols(int chunkColIndex)
Returns chunkNcols, the number of columns in Grid2DSquareCellChunkAbstract with ChunkID.chunkColIndex equal to chunkColIndex. |
int |
getChunkNcols(int chunkColIndex,
boolean handleOutOfMemoryError)
Returns chunkNcols, the number of columns in Grid2DSquareCellChunkAbstract with ChunkID.chunkColIndex equal to chunkColIndex. |
protected int |
getChunkNcolsFinalColChunks()
Returns the number of cols in the final col Chunk |
protected int |
getChunkNcolsFinalColChunks(boolean handleOutOfMemoryError)
Returns the number of cols in the final col Chunk |
int |
getChunkNrows(boolean handleOutOfMemoryError)
Returns this.chunkNrows. |
protected int |
getChunkNrows(Grid2DSquareCellAbstract.ChunkID chunkID)
Returns chunkNrows, the number of rows in Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID |
int |
getChunkNrows(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Returns chunkNrows, the number of rows in Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID |
protected int |
getChunkNrows(int chunkRowIndex)
Returns chunkNrows, the number of rows in Grid2DSquareCellChunkAbstract with ChunkID.chunkRowIndex equal to chunkRowIndex. |
int |
getChunkNrows(int chunkRowIndex,
boolean handleOutOfMemoryError)
Returns chunkNrows, the number of rows in Grid2DSquareCellChunkAbstract with ChunkID.chunkRowIndex equal to chunkRowIndex. |
protected int |
getChunkNrowsFinalRowChunks()
Returns the number of rows in the final row Chunk. |
protected int |
getChunkNrowsFinalRowChunks(boolean handleOutOfMemoryError)
Returns the number of rows in the final row Chunk. |
protected int |
getChunkRowIndex(double y)
Returns the chunk row index for the chunks intersecting the line given by y-coordinate y. |
int |
getChunkRowIndex(double y,
boolean handleOutOfMemoryError)
Returns the chunk row index for the chunks intersecting the line given by y-coordinate y. |
protected int |
getChunkRowIndex(long cellRowIndex)
Returns the chunk row index for the chunk intersecting the cells with cell row index cellRowIndex. |
int |
getChunkRowIndex(long cellRowIndex,
boolean handleOutOfMemoryError)
Returns the chunk row index for the chunk intersecting the cells with cell row index cellRowIndex. |
java.math.BigDecimal[] |
getDimensions(boolean handleOutOfMemoryError)
Returns a copy of this.dimensions. |
protected int |
getDimensionsScale(boolean handleOutOfMemoryError)
Returns a copy of this.dimensionsScale. |
protected java.io.File |
getDirectory()
Returns a copy of directory. |
java.io.File |
getDirectory(boolean handleOutOfMemoryError)
Returns a copy of directory. |
protected Grid2DSquareCellChunkAbstract |
getGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID)
Returns the Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID. |
protected Grid2DSquareCellChunkAbstract |
getGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Returns the Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID. |
protected Grid2DSquareCellChunkAbstract |
getGrid2DSquareCellChunk(int chunkRowIndex,
int chunkColIndex)
Returns the Grid2DSquareCellChunkAbstract with ChunkID.chunkRowIndex equal to chunkRowIndex and ChunkID.chunkColIndex equal to chunkColIndex. |
protected Grid2DSquareCellChunkAbstract |
getGrid2DSquareCellChunk(int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
Returns the Grid2DSquareCellChunkAbstract with ChunkID.chunkRowIndex equal to chunkRowIndex and ChunkID.chunkColIndex equal to chunkColIndex. |
protected java.util.HashSet |
getGrid2DSquareCells()
|
protected double[] |
getGridBounds()
Returns gridBounds (the bounding box of the grid) as a double[] where; gridBounds[0] xmin, left most x-coordinate of this gridBounds[1] ymin, lowest y-coordinate of this gridBounds[2] xmax, right most x-coordinate of this gridBounds[3] ymax, highest y-coordinate of this TODO: Are bounds in double range? Is there more than cellsize difference with precision? Throw appropriate exceptions. |
double[] |
getGridBounds(boolean handleOutOfMemoryError)
Returns gridBounds (the bounding box of the grid) as a double[] where; gridBounds[0] xmin, left most x-coordinate of this gridBounds[1] ymin, lowest y-coordinate of this gridBounds[2] xmax, right most x-coordinate of this gridBounds[3] ymax, highest y-coordinate of this |
GridStatisticsAbstract |
getGridStatistics()
Returns this.gridStatistics TODO: For safety, this method should either be removed and this class be made implement GridStatisticsInterface. |
protected java.math.BigDecimal |
getHeightBigDecimal()
Returns the height of the grid. |
java.math.BigDecimal |
getHeightBigDecimal(boolean handleOutOfMemoryError)
Returns the height of the grid. |
protected double |
getHeightDouble()
Returns the height of the grid. |
double |
getHeightDouble(boolean handleOutOfMemoryError)
Returns the height of the grid. |
protected java.lang.String |
getName()
Returns a copy of this.name. |
java.lang.String |
getName(boolean handleOutOfMemoryError)
Returns a copy of this.name. |
int |
getNChunkCols(boolean handleOutOfMemoryError)
Returns a copy of this.nChunkCols. |
int |
getNChunkRows(boolean handleOutOfMemoryError)
Returns a copy of this.nChunkRows. |
protected long |
getNChunks()
|
long |
getNChunks(boolean handleOutOfMemoryError)
|
long |
getNcols(boolean handleOutOfMemoryError)
Returns a copy of this.ncols. |
protected Grid2DSquareCellAbstract.CellID |
getNearestCellID(double x,
double y)
Returns the the nearest cells cellRowIndex and cellColIndex as a long[] from ID to point given by x-coordinate x, y-coordinate y. |
Grid2DSquareCellAbstract.CellID |
getNearestCellID(double x,
double y,
boolean handleOutOfMemoryError)
Returns the the nearest cells cellRowIndex and cellColIndex as a long[] from ID to point given by x-coordinate x, y-coordinate y. |
protected Grid2DSquareCellAbstract.CellID |
getNearestCellID(double x,
double y,
long cellRowIndex,
long cellColIndex)
Returns the the nearest CellID to point given by x-coordinate x, y-coordinate y in position given by cellRowIndex, cellColIndex. |
Grid2DSquareCellAbstract.CellID |
getNearestCellID(double x,
double y,
long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns the the nearest CellID to point given by x-coordinate x, y-coordinate y in position given by cellRowIndex, cellColIndex. |
protected Grid2DSquareCellAbstract.CellID |
getNearestCellID(long cellRowIndex,
long cellColIndex)
Returns the the nearest cells cellRowIndex and cellColIndex as a long[] from ID to point given by cell row index cellRowIndex, cell column index cellColIndex. |
Grid2DSquareCellAbstract.CellID |
getNearestCellID(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns the the nearest cells cellRowIndex and cellColIndex as a long[] from ID to point given by cell row index cellRowIndex, cell column index cellColIndex. |
protected Grid2DSquareCellAbstract.ChunkID |
getNextChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
int nChunkRows,
int nChunkCols)
Returns the next ChunkID in row major order from chunkID, or null. |
Grid2DSquareCellAbstract.ChunkID |
getNextChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
int nChunkRows,
int nChunkCols,
boolean handleOutOfMemoryError)
Returns the next ChunkID in row major order from chunkID, or null. |
protected Grid2DSquareCellAbstract.ChunkID |
getNextChunkRowMinor(Grid2DSquareCellAbstract.ChunkID chunkID,
int nChunkRows,
int nChunkCols)
Returns the next ChunkID in row minor order from this, or null. |
Grid2DSquareCellAbstract.ChunkID |
getNextChunkRowMinor(Grid2DSquareCellAbstract.ChunkID chunkID,
int nChunkRows,
int nChunkCols,
boolean handleOutOfMemoryError)
Returns the next ChunkID in row minor order from this, or null. |
abstract java.math.BigDecimal |
getNoDataValueBigDecimal(boolean handleOutOfMemoryError)
Returns the noDataValue of this as a BigDecimal. |
long |
getNrows(boolean handleOutOfMemoryError)
Returns a copy of this.nrows. |
protected Grid2DSquareCellAbstract.ChunkID |
getPreviousChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
int nChunkRows,
int nChunkCols)
Returns the next ChunkID in row major order from this, or null. |
Grid2DSquareCellAbstract.ChunkID |
getPreviousChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
int nChunkRows,
int nChunkCols,
boolean handleOutOfMemoryError)
Returns the next ChunkID in row major order from this, or null. |
protected java.math.BigDecimal |
getWidthBigDecimal()
Returns the width of the grid as a BigDecimal. |
java.math.BigDecimal |
getWidthBigDecimal(boolean handleOutOfMemoryError)
Returns the width of the grid as a BigDecimal. |
protected double |
getWidthDouble()
Returns the width of the grid as a double. |
double |
getWidthDouble(boolean handleOutOfMemoryError)
Returns the width of the grid as a double. |
protected void |
initDimensions(java.math.BigDecimal[] dimensions)
Initialises this.dimensions and this.dimensionScale. |
protected void |
initGrid2DSquareCellAbstract()
Initialises Grid2DSquareCellAbstract fields of this. |
protected void |
initGrid2DSquareCellAbstract(Grid2DSquareCellAbstract grid2DSquareCell)
Initialises non transient Grid2DSquareCellAbstract fields from grid2DSquareCell |
protected void |
initGrid2DSquareCellChunks(java.io.File gridFile)
|
void |
initMemoryReserve(boolean handleOutOfMemoryError)
Initialises memoryReserve. |
protected void |
initNChunkCols()
Initialises this.nChunkCols. |
protected void |
initNChunkRows()
Initialises this.nChunkRows. |
protected boolean |
isInCache(Grid2DSquareCellAbstract.ChunkID chunkID)
Returns true iff grid2DSquareCellChunk given by chunkID is swapToFiled. |
boolean |
isInCache(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Returns true iff grid2DSquareCellChunk given by chunkID is in memory. |
protected boolean |
isInGrid(java.math.BigDecimal xBigDecimal,
java.math.BigDecimal yBigDecimal)
Returns true iff point given by x-coordinate x, y-coordinate y is in the Grid. |
boolean |
isInGrid(java.math.BigDecimal xBigDecimal,
java.math.BigDecimal yBigDecimal,
boolean handleOutOfMemoryError)
Returns true iff point given by x-coordinate x, y-coordinate y is in the Grid. |
protected boolean |
isInGrid(double x,
double y)
Returns true iff point given by x-coordinate x, y-coordinate y is in the Grid. |
boolean |
isInGrid(double x,
double y,
boolean handleOutOfMemoryError)
Returns true iff point given by x-coordinate x, y-coordinate y is in the Grid. |
protected boolean |
isInGrid(Grid2DSquareCellAbstract.CellID cellID)
Returns true iff cell given by cellID is in the Grid. |
boolean |
isInGrid(Grid2DSquareCellAbstract.CellID cellID,
boolean handleOutOfMemoryError)
Returns true iff cell given by cellID is in the Grid. |
protected boolean |
isInGrid(Grid2DSquareCellAbstract.ChunkID chunkID)
Returns true iff ChunkID chunkID is in the Grid. |
boolean |
isInGrid(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Returns true iff ChunkID chunkID is in the Grid. |
protected boolean |
isInGrid(int chunkRowIndex,
int chunkColIndex)
Returns true iff position given by chunk row index chunkRowIndex, chunk column index chunkColIndex is in the Grid. |
boolean |
isInGrid(int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
Returns true iff position given by chunk row index chunkRowIndex, chunk column index chunkColIndex is in the Grid. |
protected boolean |
isInGrid(int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex)
Returns true iff cell given by chunkRowIndex, chunkColIndex, chunkCellRowIndex, chunkCellColIndex is in the Grid. |
boolean |
isInGrid(int chunkRowIndex,
int chunkColIndex,
int chunkCellRowIndex,
int chunkCellColIndex,
boolean handleOutOfMemoryError)
Returns true iff cell given by chunkRowIndex, chunkColIndex, chunkCellRowIndex, chunkCellColIndex is in the Grid. |
protected boolean |
isInGrid(long cellRowIndex,
long cellColIndex)
Returns true iff position given by cell row index cellRowIndex, cell column index cellColIndex is in the Grid. |
boolean |
isInGrid(long cellRowIndex,
long cellColIndex,
boolean handleOutOfMemoryError)
Returns true iff position given by cell row index cellRowIndex, cell column index cellColIndex is in the Grid. |
abstract java.util.Iterator |
iterator(boolean handleOutOfMemoryError)
Returns an iterator over the cell values in this. |
protected void |
loadIntoCacheChunk(Grid2DSquareCellAbstract.ChunkID chunkID)
Attempts to load into the memory cache Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID. |
void |
loadIntoCacheChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Attempts to load into the memory cache a AbstractGrid2DSquareCellChunk with ChunkID |
protected void |
loadIntoCacheChunk(int chunkRowIndex,
int chunkColIndex)
Restores a grid2DSquareCellChunk from a swapped cache file. |
void |
loadIntoCacheChunk(int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
Restores a grid2DSquareCellChunk from a swapped cache file. |
protected java.lang.Object |
loadObject(java.io.File file)
Loads an object from File file. |
protected java.lang.Object |
loadObject(java.io.File file,
boolean handleOutOfMemoryError)
Loads an object from File file. |
protected java.lang.Object |
loadObject(java.io.ObjectInputStream objectInputStream)
Loads an object from the ObjectInputStream objectInputStream. |
abstract double |
setCell(long cellRowIndex,
long cellColIndex,
double valueToSet,
boolean handleOutOfMemoryError)
Returns the value at cellRowIndex, cellColIndex as a double and sets it to valueToSet. |
void |
setChunk(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk,
Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Sets the Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID to grid2DSquareCellChunk. |
void |
setGrid2DSquareCells(java.util.HashSet grid2DSquareCells,
boolean handleOutOfMemoryError)
Sets this.grid2DSquareCells to grid2DSquareCells |
protected void |
setName(java.lang.String name)
Sets this.name to name. |
void |
setName(java.lang.String name,
boolean handleOutOfMemoryError)
Sets this.name to name. |
protected Grid2DSquareCellAbstract.ChunkID |
swapToFileGrid2DSquareCellChunk()
Attempts to write to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
Grid2DSquareCellAbstract.ChunkID |
swapToFileGrid2DSquareCellChunk(boolean handleOutOfMemoryError)
Attempts to write to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
protected Grid2DSquareCellAbstract.ChunkID |
swapToFileGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
Attempts to write to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
Grid2DSquareCellAbstract.ChunkID |
swapToFileGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Attempts to write to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
protected Grid2DSquareCellAbstract.ChunkID |
swapToFileGrid2DSquareCellChunkExcept(java.util.HashSet chunkIDs)
Attempts to write to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
Grid2DSquareCellAbstract.ChunkID |
swapToFileGrid2DSquareCellChunkExcept(java.util.HashSet chunkIDs,
boolean handleOutOfMemoryError)
Attempts to write to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
protected long |
swapToFileGrid2DSquareCellChunks()
Attempts to swap seriailsed version of all grid2DSquareCellChunks. |
long |
swapToFileGrid2DSquareCellChunks(boolean handleOutOfMemoryError)
Attempts to swap seriailsed version of all grid2DSquareCellChunks. |
protected long |
swapToFileGrid2DSquareCellChunks(int cri0,
int cci0,
int cri1,
int cci1)
Attempts to swap seriailsed version of all Grid2DSquareCellChunk from (cri0, cci0) to (cri1, cci1) in row major order. |
long |
swapToFileGrid2DSquareCellChunks(int cri0,
int cci0,
int cri1,
int cci1,
boolean handleOutOfMemoryError)
Attempts to swap seriailsed version of all Grid2DSquareCellChunk from (cri0, cci0) to (cri1, cci1) in row major order. |
protected long |
swapToFileGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
Attempts to write to file and clear from the cache a Grid2DSquareCellChunkAbstract in this except that with ChunkID chunkID. |
long |
swapToFileGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Attempts to write to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
protected long |
swapToFileGrid2DSquareCellsGrid2DSquareCellChunk()
Attempts to swap to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
long |
swapToFileGrid2DSquareCellsGrid2DSquareCellChunk(boolean handleOutOfMemoryError)
Attempts to swap to file and clear from the cache a Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
protected long |
swapToFileGrid2DSquareCellsGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
Attempts to write to file and clear from the cache (swap) a Grid2DSquareCellChunkAbstract in each Grid2DSquareCellAbstract of this.grid2DSquareCells. |
long |
swapToFileGrid2DSquareCellsGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Attempts to write to file and clear from the cache (swap) a Grid2DSquareCellChunkAbstract in each Grid2DSquareCellAbstract of this.grid2DSquareCells. |
protected long |
swapToFileGrid2DSquareCellsGrid2DSquareCellChunks()
Attempts to write to file and clear from the cache all Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
long |
swapToFileGrid2DSquareCellsGrid2DSquareCellChunks(boolean handleOutOfMemoryError)
Attempts to write to file and clear from the cache all Grid2DSquareCellChunkAbstract in this.grid2DSquareCells. |
protected long |
swapToFileGrid2DSquareCellsGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
Attempts to swap to file and clear from the cache the Grid2DSquareCellChunkAbstract in this.grid2DSquareCells that do not have a ChunkID equal to chunkID. |
long |
swapToFileGrid2DSquareCellsGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
Attempts to swap to file and clear from the cache the Grid2DSquareCellChunkAbstract in this.grid2DSquareCells that do not have a ChunkID equal to chunkID. |
abstract java.lang.String |
toString(boolean handleOutOfMemoryError)
Returns a string description of the instance. |
protected java.lang.String |
toString(int flag)
Returns a string description of the Abstract fields of this instance. |
java.lang.String |
toString(int flag,
boolean handleOutOfMemoryError)
Returns a string description of the Abstract fields of this instance. |
protected void |
writeToFile(boolean swapToFileCache)
A method to write this instance to Files located in the directory returned by getDirectory(). |
void |
writeToFile(boolean swapToFileCache,
boolean handleOutOfMemoryError)
A method to write this instance to Files located in the directory returned by getDirectory(). |
protected Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunk()
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks. |
Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunk(boolean handleOutOfMemoryError)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks. |
protected boolean |
writeToFileGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID)
A method that attempts to write to File a seriailized version of the Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks given by chunkID. |
boolean |
writeToFileGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
A method that attempts to write to File a seriailized version of the Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks given by chunkID. |
protected boolean |
writeToFileGrid2DSquareCellChunk(int chunkRowIndex,
int chunkColIndex)
A method that attempts to write to File a seriailized version of the Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks given by; chunk row index chunkRowIndex, chunk column index chunkColIndex. |
boolean |
writeToFileGrid2DSquareCellChunk(int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
A method that attempts to write to File a seriailized version of the Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks given by; chunk row index chunkRowIndex, chunk column index chunkColIndex. |
protected Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with ChunkID equal to chunkID. |
Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with ChunkID equal to chunkID. |
protected Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunkExcept(int chunkRowIndex,
int chunkColIndex)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with; chunk row index chunkRowIndex, chunk column index chunkColIndex. |
Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunkExcept(int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with; chunk row index chunkRowIndex, chunk column index chunkColIndex. |
protected Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunkExceptReverseOrder(Grid2DSquareCellAbstract.ChunkID chunkID)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with; chunk row index chunkRowIndex, chunk column index chunkColIndex. |
Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunkExceptReverseOrder(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with; chunk row index chunkRowIndex, chunk column index chunkColIndex. |
protected Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunkExceptReverseOrder(int chunkRowIndex,
int chunkColIndex)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with; chunk row index chunkRowIndex, chunk column index chunkColIndex. |
Grid2DSquareCellAbstract.ChunkID |
writeToFileGrid2DSquareCellChunkExceptReverseOrder(int chunkRowIndex,
int chunkColIndex,
boolean handleOutOfMemoryError)
A method that attempts to write to File a seriailized version of a Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with; chunk row index chunkRowIndex, chunk column index chunkColIndex. |
protected void |
writeToFileGrid2DSquareCellChunks()
A method that attempts to write to File seriailized versions of all Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks. |
void |
writeToFileGrid2DSquareCellChunks(boolean handleOutOfMemoryError)
A method that attempts to write to File seriailized versions of all Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks. |
protected void |
writeToFileGrid2DSquareCellChunks(java.util.HashSet chunkIDs)
A method that attempts to write to File seriailized versions of those Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks that have ChunkID equal to those in chunkIDs. |
void |
writeToFileGrid2DSquareCellChunks(java.util.HashSet chunkIDs,
boolean handleOutOfMemoryError)
A method that attempts to write to File seriailized versions of those Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks that have ChunkID equal to those in chunkIDs. |
protected void |
writeToFileGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
A method that attempts to write to File seriailized versions of those Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with ChunkID equal to chunkID. |
void |
writeToFileGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID,
boolean handleOutOfMemoryError)
A method that attempts to write to File seriailized versions of those Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except that with ChunkID equal to chunkID. |
protected void |
writeToFileGrid2DSquareCellChunksExcept(java.util.HashSet chunkIDs)
A method that attempts to write to File seriailized versions of those Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except those that have ChunkID in chunkIDs. |
void |
writeToFileGrid2DSquareCellChunksExcept(java.util.HashSet chunkIDs,
boolean handleOutOfMemoryError)
A method that attempts to write to File seriailized versions of those Grid2DSquareCellChunkAbstract in this.grid2DSquareCellChunks except those that have ChunkID in chunkIDs. |
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.OutOfMemoryErrorHandler |
---|
clearMemoryReserve, initMemoryReserve, initMemoryReserve |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient java.util.HashSet grid2DSquareCells
protected transient java.io.File directory
protected transient java.util.HashMap grid2DSquareCellChunks
protected GridStatisticsAbstract gridStatistics
protected int nChunkRows
protected int nChunkCols
protected int chunkNrows
protected int chunkNcols
protected long nrows
protected long ncols
protected java.lang.String name
protected java.math.BigDecimal[] dimensions
protected int dimensionsScale
protected static UnsignedLongPowersOf2 unsignedLongPowersOf2
Constructor Detail |
---|
public Grid2DSquareCellAbstract()
Method Detail |
---|
public final void initMemoryReserve(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected void initGrid2DSquareCellChunks(java.io.File gridFile)
protected void initGrid2DSquareCellAbstract()
protected void initGrid2DSquareCellAbstract(Grid2DSquareCellAbstract grid2DSquareCell)
grid2DSquareCell
- The Grid2DSquareCellAbstract from which the
non transient Grid2DSquareCellAbstract fields of this are set.protected java.util.HashSet getGrid2DSquareCells()
public void setGrid2DSquareCells(java.util.HashSet grid2DSquareCells, boolean handleOutOfMemoryError)
grid2DSquareCells
- The HashSet this.grid2DSquareCells is set to.public GridStatisticsAbstract getGridStatistics()
protected Grid2DSquareCellChunkAbstract getGrid2DSquareCellChunk(int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The ChunkID.chunkRowIndex of the returned
Grid2DSquareCellChunkAbstract.chunkColIndex
- The ChunkID.chunkColIndex of the returned
Grid2DSquareCellChunkAbstract.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected Grid2DSquareCellChunkAbstract getGrid2DSquareCellChunk(int chunkRowIndex, int chunkColIndex)
chunkRowIndex
- The ChunkID.chunkRowIndex of the returned
Grid2DSquareCellChunkAbstract.chunkColIndex
- The ChunkID.chunkColIndex of the returned
Grid2DSquareCellChunkAbstract.protected Grid2DSquareCellChunkAbstract getGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the returned Grid2DSquareCellChunkAbstract.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected Grid2DSquareCellChunkAbstract getGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the returned Grid2DSquareCellChunkAbstract.public abstract java.util.Iterator iterator(boolean handleOutOfMemoryError)
public abstract java.lang.String toString(boolean handleOutOfMemoryError)
public java.lang.String toString(int flag, boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.flag
- This is ignored. It is simply to distinguish this method from
the abstract method toString(boolean).protected java.lang.String toString(int flag)
flag
- This is ignored. It is simply to distinguish this method from
the abstract method toString(boolean).public java.io.File getDirectory(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected java.io.File getDirectory()
public java.lang.String getName(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected java.lang.String getName()
public void setName(java.lang.String name, boolean handleOutOfMemoryError)
name
- The String this.name is set to.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected void setName(java.lang.String name)
name
- The String this.name is set to.public java.lang.String getBasicDescription(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected java.lang.String getBasicDescription()
public void setChunk(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk, Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
grid2DSquareCellChunk
- The Grid2DSquareCellChunkAbstract that the
Grid2DSquareCellChunkAbstract with ChunkID equal to chunkID is set as.chunkID
- The ChunkID of the Grid2DSquareCellChunkAbstract that is set.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final long getNcols(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final long getNrows(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final int getNChunkRows(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void initNChunkRows()
public final int getNChunkCols(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final long getNChunks(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final long getNChunks()
protected final void initNChunkCols()
public final int getChunkNrows(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final int getChunkNrows(int chunkRowIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The ChunkID.chunkRowIndex of the
Grid2DSquareCellChunkAbstract thats chunkNrows is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkNrows(int chunkRowIndex)
chunkRowIndex
- The ChunkID.chunkRowIndex of the
Grid2DSquareCellChunkAbstract thats chunkNrows is returned.public final int getChunkNcols(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final int getChunkNcols(int chunkColIndex, boolean handleOutOfMemoryError)
chunkColIndex
- The ChunkID.chunkColIndex of the
Grid2DSquareCellChunkAbstract thats chunkNrows is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkNcols(int chunkColIndex)
chunkColIndex
- The ChunkID.chunkColIndex of the
Grid2DSquareCellChunkAbstract thats chunkNrows is returned.protected final int getChunkNrowsFinalRowChunks(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkNrowsFinalRowChunks()
protected final int getChunkNcolsFinalColChunks(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkNcolsFinalColChunks()
public final int getChunkNrows(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the Grid2DSquareCellChunkAbstract thats number
of rows is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkNrows(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the Grid2DSquareCellChunkAbstract thats number
of rows is returned.public final int getChunkNcols(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the Grid2DSquareCellChunkAbstract thats number
of columns is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkNcols(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the Grid2DSquareCellChunkAbstract thats number
of columns is returned.public final java.math.BigDecimal[] getDimensions(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final double getCellsizeDouble(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getDimensionsScale(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void initDimensions(java.math.BigDecimal[] dimensions)
public double getCellDouble(java.awt.geom.Point2D.Double point, boolean handleOutOfMemoryError)
point
- The Point2D.Double for which the cell value is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected double getCellDouble(java.awt.geom.Point2D.Double point)
point
- The Point2D.Double for which the cell value is returned.public double getCellDouble(double x, double y, boolean handleOutOfMemoryError)
x
- The x coordinate of the point at which the cell value is returned.y
- The y coordinate of the point at which the cell value is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected double getCellDouble(double x, double y)
x
- The x coordinate of the point at which the cell value is returned.y
- The y coordinate of the point at which the cell value is returned.public double getCellDouble(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
cellRowIndex
- The cell row index of the .cellColIndex
- The cell column index.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected double getCellDouble(long cellRowIndex, long cellColIndex)
cellRowIndex
- The cell row index of the .cellColIndex
- The cell column index.public double getCellDouble(int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The cell chunk row index.chunkColIndex
- The cell chunk column index.chunkCellRowIndex
- The cell row index of the chunk.chunkCellColIndex
- The cell column index of the chunk.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected double getCellDouble(int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex)
chunkRowIndex
- The cell chunk row index.chunkColIndex
- The cell chunk column index.chunkCellRowIndex
- The cell row index of the chunk.chunkCellColIndex
- The cell column index of the chunk.public double getCellDouble(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk, int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, boolean handleOutOfMemoryError)
grid2DSquareCellChunk
- The Grid2DSquareCellChunkAbstract containing
the cell.chunkRowIndex
- The cell chunk row index.chunkColIndex
- The cell chunk column index.chunkCellRowIndex
- The cell row index of the chunk.chunkCellColIndex
- The cell column index of the chunk.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected double getCellDouble(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk, int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex)
grid2DSquareCellChunk
- The Grid2DSquareCellChunkAbstract containing
the cell.chunkRowIndex
- The cell chunk row index.chunkColIndex
- The cell chunk column index.chunkCellRowIndex
- The cell row index of the chunk.chunkCellColIndex
- The cell column index of the chunk.public int getCellInt(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
cellRowIndex
- The cell row index.cellColIndex
- The cell column index.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected int getCellInt(long cellRowIndex, long cellColIndex)
cellRowIndex
- The cell row index.cellColIndex
- The cell column index.public int getCellInt(int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The cell chunk row index.chunkColIndex
- The cell chunk column index.chunkCellRowIndex
- The cell row index of the chunk.chunkCellColIndex
- The cell column index of the chunk.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected int getCellInt(int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex)
chunkRowIndex
- The cell chunk row index.chunkColIndex
- The cell chunk column index.chunkCellRowIndex
- The cell row index of the chunk.chunkCellColIndex
- The cell column index of the chunk.public int getCellInt(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk, int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, boolean handleOutOfMemoryError)
grid2DSquareCellChunk
- The Grid2DSquareCellChunkAbstract containing
the cell.chunkRowIndex
- The cell chunk row index.chunkColIndex
- The cell chunk column index.chunkCellRowIndex
- The cell row index of the chunk.chunkCellColIndex
- The cell column index of the chunk.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected int getCellInt(Grid2DSquareCellChunkAbstract grid2DSquareCellChunk, int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex)
grid2DSquareCellChunk
- The Grid2DSquareCellChunkAbstract containing
the cell.chunkRowIndex
- The cell chunk row index.chunkColIndex
- The cell chunk column index.chunkCellRowIndex
- The cell row index of the chunk.chunkCellColIndex
- The cell column index of the chunk.public abstract double setCell(long cellRowIndex, long cellColIndex, double valueToSet, boolean handleOutOfMemoryError)
cellRowIndex
- The cell row index.cellColIndex
- The cell column index.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final int getChunkColIndex(double x, boolean handleOutOfMemoryError)
x
- The x-coordinate of the line intersecting the chunk column
index returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkColIndex(double x)
x
- The x-coordinate of the line intersecting the chunk column
index returned.public final int getChunkColIndex(long cellColIndex, boolean handleOutOfMemoryError)
cellColIndex
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkColIndex(long cellColIndex)
cellColIndex
- public final long getCellColIndex(double x, boolean handleOutOfMemoryError)
x
- The x-coordinate of the line intersecting the cell column
index returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final long getCellColIndex(double x)
x
- The x-coordinate of the line intersecting the cell column
index returned.public final long getCellColIndex(java.math.BigDecimal xBigDecimal, boolean handleOutOfMemoryError)
xBigDecimal
- The x-coordinate of the line intersecting the cell column
index returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final long getCellColIndex(java.math.BigDecimal xBigDecimal)
xBigDecimal
- The x-coordinate of the line intersecting the cell column
index returned.public final long getCellColIndex(int chunkColIndex, int chunkCellColIndex, boolean handleOutOfMemoryError)
chunkColIndex
- chunkCellColIndex
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final long getCellColIndex(int chunkColIndex, int chunkCellColIndex)
chunkColIndex
- chunkCellColIndex
- public final int getChunkCellColIndex(double x, boolean handleOutOfMemoryError)
x
- The x-coordinate of the line intersecting the chunk cell column
index returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkCellColIndex(double x)
x
- The x-coordinate of the line intersecting the chunk cell column
index returned.public final int getChunkCellColIndex(long cellColIndex, boolean handleOutOfMemoryError)
cellColIndex
- The cell column index of the cell thats chunk cell
column index is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkCellColIndex(long cellColIndex)
cellColIndex
- The cell column index of the cell thats chunk cell
column index is returned.public final int getChunkRowIndex(double y, boolean handleOutOfMemoryError)
y
- The y-coordinate of the line for which the chunk row index is
returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkRowIndex(double y)
y
- The y-coordinate of the line for which the chunk row index is
returned.public final int getChunkRowIndex(long cellRowIndex, boolean handleOutOfMemoryError)
cellRowIndex
- The cell row index of the cells thats chunk row index
is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkRowIndex(long cellRowIndex)
cellRowIndex
- The cell row index of the cells thats chunk row index
is returned.public final long getCellRowIndex(double y, boolean handleOutOfMemoryError)
y
- The y-coordinate of the line thats cell row index is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final long getCellRowIndex(double y)
y
- The y-coordinate of the line thats cell row index is returned.public final long getCellRowIndex(java.math.BigDecimal yBigDecimal, boolean handleOutOfMemoryError)
yBigDecimal
- The y-coordinate of the line for which the cell row index
is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final long getCellRowIndex(java.math.BigDecimal yBigDecimal)
yBigDecimal
- The y-coordinate of the line for which the cell row index
is returned.public final long getCellRowIndex(int chunkRowIndex, int chunkCellRowIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- chunkCellRowIndex
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final long getCellRowIndex(int chunkRowIndex, int chunkCellRowIndex)
chunkColIndex
- chunkCellColIndex
- public final int getChunkCellRowIndex(double y, boolean handleOutOfMemoryError)
y
- The y-coordinate of the line for which the chunk cell row index is
returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkCellRowIndex(double y)
y
- The y-coordinate of the line for which the chunk cell row index is
returned.public final int getChunkCellRowIndex(long cellRowIndex, boolean handleOutOfMemoryError)
cellRowIndex
- The cell row index of the cells that chunk cell row
index is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final int getChunkCellRowIndex(long cellRowIndex)
cellRowIndex
- The cell row index of the cells that chunk cell row
index is returned.public final Grid2DSquareCellAbstract.CellID getCellID(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
cellRowIndex
- The cell row index.cellColIndex
- The cell column index.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final Grid2DSquareCellAbstract.CellID getCellID(long cellRowIndex, long cellColIndex)
cellRowIndex
- The cell row index.cellColIndex
- The cell column index.public final Grid2DSquareCellAbstract.CellID getCellID(double x, double y, boolean handleOutOfMemoryError)
x
- The x-coordinate.y
- The y-coordinate.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final Grid2DSquareCellAbstract.CellID getCellID(double x, double y)
x
- The x-coordinate.y
- The y-coordinate.public final void writeToFile(boolean swapToFileCache, boolean handleOutOfMemoryError) throws java.io.IOException
swapToFileCache
- Iff true then this.grid2DSquareCellChunks
is written to new File( getDirectory(), "cache" ).handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
java.io.IOException
protected void writeToFile(boolean swapToFileCache) throws java.io.IOException
swapToFileCache
- Iff true then this.grid2DSquareCellChunks
is written to new File(getDirectory(),"cache").
java.io.IOException
public final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunk(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunk()
public final boolean writeToFileGrid2DSquareCellChunk(int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract to be written.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract to be written.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final boolean writeToFileGrid2DSquareCellChunk(int chunkRowIndex, int chunkColIndex)
chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract to be written.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract to be written.
public final boolean writeToFileGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The chunkID of the Grid2DSquareCellChunkAbstract to be written.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final boolean writeToFileGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The chunkID of the Grid2DSquareCellChunkAbstract to be written.
public final void writeToFileGrid2DSquareCellChunks(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void writeToFileGrid2DSquareCellChunks()
public final void writeToFileGrid2DSquareCellChunks(java.util.HashSet chunkIDs, boolean handleOutOfMemoryError)
chunkIDs
- A HashSet containing the ChunkID of the
Grid2DSquareCellChunkAbstract to be written to file.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void writeToFileGrid2DSquareCellChunks(java.util.HashSet chunkIDs)
chunkIDs
- A HashSet containing the ChunkID of the
Grid2DSquareCellChunkAbstract to be written to file.public final void writeToFileGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the chunk not to be written.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void writeToFileGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the chunk not to be written.public final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the chunk not to be swapToFiled.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the chunk not to be swapToFiled.
public final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunkExcept(int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The chunk row index.chunkColIndex
- The chunk column index.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunkExcept(int chunkRowIndex, int chunkColIndex)
chunkRowIndex
- The chunk row index.chunkColIndex
- The chunk column index.
public final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunkExceptReverseOrder(int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The chunk row index.chunkColIndex
- The chunk column index.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunkExceptReverseOrder(int chunkRowIndex, int chunkColIndex)
chunkRowIndex
- The chunk row index.chunkColIndex
- The chunk column index.
public final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunkExceptReverseOrder(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the chunk not to be swapToFiled.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final Grid2DSquareCellAbstract.ChunkID writeToFileGrid2DSquareCellChunkExceptReverseOrder(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the chunk not to be swapToFiled.public final void writeToFileGrid2DSquareCellChunksExcept(java.util.HashSet chunkIDs, boolean handleOutOfMemoryError)
chunkIDs
- A hashSet containing ChunkIDs not to be swapToFiled.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void writeToFileGrid2DSquareCellChunksExcept(java.util.HashSet chunkIDs)
chunkIDs
- A hashSet containing ChunkIDs not to be swapToFiled.public final Grid2DSquareCellAbstract.ChunkID swapToFileGrid2DSquareCellChunk(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final Grid2DSquareCellAbstract.ChunkID swapToFileGrid2DSquareCellChunk()
public final Grid2DSquareCellAbstract.ChunkID swapToFileGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final Grid2DSquareCellAbstract.ChunkID swapToFileGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
public final long swapToFileGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final long swapToFileGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- ChunkID of the Grid2DSquareCellChunkAbstract not to be swapped.
public final Grid2DSquareCellAbstract.ChunkID swapToFileGrid2DSquareCellChunkExcept(java.util.HashSet chunkIDs, boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final Grid2DSquareCellAbstract.ChunkID swapToFileGrid2DSquareCellChunkExcept(java.util.HashSet chunkIDs)
public final long swapToFileGrid2DSquareCellsGrid2DSquareCellChunks(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final long swapToFileGrid2DSquareCellsGrid2DSquareCellChunks()
public final long swapToFileGrid2DSquareCellsGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the Grid2DSquareCellChunkAbstract in this.grid2DSquareCells
not to swap and clear from cache.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final long swapToFileGrid2DSquareCellsGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the Grid2DSquareCellChunkAbstract in this.grid2DSquareCells
not to swap and clear from cache.
public final long swapToFileGrid2DSquareCellsGrid2DSquareCellChunk(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final long swapToFileGrid2DSquareCellsGrid2DSquareCellChunk()
public final long swapToFileGrid2DSquareCellsGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ID of Chunks not to swap and clear from cache.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final long swapToFileGrid2DSquareCellsGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ID of Chunks not to swap and clear from cache.
public final long swapToFileGrid2DSquareCellChunks(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final long swapToFileGrid2DSquareCellChunks()
public final long swapToFileGrid2DSquareCellChunks(int cri0, int cci0, int cri1, int cci1, boolean handleOutOfMemoryError)
cri0
- The chunk row index of the first Grid2DSquareCellChunk to be
swapped.cci0
- The chunk column index of the first Grid2DSquareCellChunk to
be swapped.cri1
- The chunk row index of the last Grid2DSquareCellChunk to be
swapped.cci1
- The chunk column index of the last Grid2DSquareCellChunk to be
swapped.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final long swapToFileGrid2DSquareCellChunks(int cri0, int cci0, int cri1, int cci1)
cri0
- The chunk row index of the first Grid2DSquareCellChunks to be
swapped.cci0
- The chunk column index of the first Grid2DSquareCellChunks to
be swapped.cri1
- The chunk row index of the last Grid2DSquareCellChunks to be
swapped.cci1
- The chunk column index of the last Grid2DSquareCellChunks to
be swapped.
public final boolean isInCache(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the grid2DSquareCellChunk tested to see if
it is swapToFiled.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final boolean isInCache(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the grid2DSquareCellChunk tested to see if
it is swapToFiled.protected final void clearFromCacheGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the grid2DSquareCellChunk to be cleared.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void clearFromCacheGrid2DSquareCellChunk(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the grid2DSquareCellChunk to be cleared.protected final void clearFromCacheGrid2DSquareCellChunks(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void clearFromCacheGrid2DSquareCellChunks()
protected final void clearFromCacheGrid2DSquareCellChunks(java.util.HashSet chunkIDs, boolean handleOutOfMemoryError)
chunkIDs
- A HashSet containing the ChunkIDs of the
Grid2DSquareCellChunkAbstracts to be cleared.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void clearFromCacheGrid2DSquareCellChunks(java.util.HashSet chunkIDs)
chunkIDs
- A HashSet containing the ChunkIDs of the
Grid2DSquareCellChunkAbstracts to be cleared.protected final void clearFromCacheGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the grid2DSquareCellChunk not to be cleared.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void clearFromCacheGrid2DSquareCellChunkExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the grid2DSquareCellChunk not to be cleared.protected final void clearFromCacheGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the grid2DSquareCellChunk not to be cleared.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void clearFromCacheGrid2DSquareCellChunksExcept(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the grid2DSquareCellChunk not to be cleared.protected final void clearFromCacheGrid2DSquareCellChunksExcept(java.util.HashSet chunkIDs, boolean handleOutOfMemoryError)
chunkIDs
- The HashSet of ChunkIDs of the grid2DSquareCellChunks not
to be cleared.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void clearFromCacheGrid2DSquareCellChunksExcept(java.util.HashSet chunkIDs)
chunkIDs
- The HashSet of ChunkIDs of the grid2DSquareCellChunks not
to be cleared.public final void loadIntoCacheChunk(int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The chunk row index of the grid2DSquareCellChunk
to be restored.chunkColIndex
- The chunk column index of the grid2DSquareCellChunk
to be restored.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void loadIntoCacheChunk(int chunkRowIndex, int chunkColIndex)
chunkRowIndex
- The chunk row index of the grid2DSquareCellChunk
to be restored.chunkColIndex
- The chunk column index of the grid2DSquareCellChunk
to be restored.public final void loadIntoCacheChunk(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of the grid2DSquareCellChunk to be restored.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final void loadIntoCacheChunk(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of the Grid2DSquareCellChunkAbstract to be restored.protected final java.lang.Object loadObject(java.io.File file, boolean handleOutOfMemoryError)
file
- The file from which the Object is loaded.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are
initiated, then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
protected final java.lang.Object loadObject(java.io.File file)
file
- The file from which the Object is loaded.
protected final java.lang.Object loadObject(java.io.ObjectInputStream objectInputStream)
file
- The file from which the Object is loaded.
public final Grid2DSquareCellAbstract.CellID[] getCellIDs(double x, double y, double distance, boolean handleOutOfMemoryError)
x
- the x-coordinate of the circle centre from which cell values are
returned.y
- the y-coordinate of the circle centre from which cell values are
returned.distance
- the radius of the circle for which intersected cell
values are returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are
initiated, then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final Grid2DSquareCellAbstract.CellID[] getCellIDs(double x, double y, double distance)
x
- the x-coordinate of the circle centre from which cell values are
returned.y
- the y-coordinate of the circle centre from which cell values are
returned.distance
- the radius of the circle for which intersected cell
values are returned.public final Grid2DSquareCellAbstract.CellID[] getCellIDs(long cellRowIndex, long cellColIndex, double distance, boolean handleOutOfMemoryError)
cellRowIndex
- the row index for the cell thats centroid is the
circle centre from which cell values are returned.cellColIndex
- the column index for the cell thats centroid is the
circle centre from which cell values are returned.distance
- the radius of the circle for which intersected cell
values are returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final Grid2DSquareCellAbstract.CellID[] getCellIDs(long cellRowIndex, long cellColIndex, double distance)
cellRowIndex
- the row index for the cell thats centroid is the
circle centre from which cell values are returned.cellColIndex
- the column index for the cell thats centroid is the
circle centre from which cell values are returned.distance
- the radius of the circle for which intersected cell
values are returned.public Grid2DSquareCellAbstract.CellID[] getCellIDs(double x, double y, long cellRowIndex, long cellColIndex, double distance, boolean handleOutOfMemoryError)
x
- the x-coordinate of the circle centre from which cell values are
returned.y
- the y-coordinate of the circle centre from which cell values are
returned.cellRowIndex
- the row index at y.cellColIndex
- the col index at x.distance
- the radius of the circle for which intersected cell
values are returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected Grid2DSquareCellAbstract.CellID[] getCellIDs(double x, double y, long cellRowIndex, long cellColIndex, double distance)
x
- the x-coordinate of the circle centre from which cell values are
returned.y
- the y-coordinate of the circle centre from which cell values are
returned.cellRowIndex
- the row index at y.cellColIndex
- the col index at x.distance
- the radius of the circle for which intersected cell
values are returned.
TODO:
remove need for copy to new array.public Grid2DSquareCellAbstract.CellID getNearestCellID(double x, double y, boolean handleOutOfMemoryError)
x
- the x-coordinate of the point.y
- the y-coordinate of the point.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected Grid2DSquareCellAbstract.CellID getNearestCellID(double x, double y)
x
- the x-coordinate of the point.y
- the y-coordinate of the point.public Grid2DSquareCellAbstract.CellID getNearestCellID(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
cellRowIndex
- the row index from which nearest cell ID is returned.cellColIndex
- the column index from which nearest cell ID is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
TODO:
return CellID[] as could be more than one nearest CellIDprotected Grid2DSquareCellAbstract.CellID getNearestCellID(long cellRowIndex, long cellColIndex)
cellRowIndex
- the row index from which nearest cell ID is returned.cellColIndex
- the column index from which nearest cell ID is returned.
TODO:
return CellID[] as could be more than one nearest CellIDpublic Grid2DSquareCellAbstract.CellID getNearestCellID(double x, double y, long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
x
- The x-coordinate of the point.y
- The y-coordinate of the point.cellRowIndex
- The cell row index of cell containing point.cellColIndex
- The cell column index of cell containing point.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected Grid2DSquareCellAbstract.CellID getNearestCellID(double x, double y, long cellRowIndex, long cellColIndex)
x
- The x-coordinate of the point.y
- The y-coordinate of the point.cellRowIndex
- The cell row index of cell containing point.cellColIndex
- The cell column index of cell containing point.public final double getHeightDouble(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final double getHeightDouble()
public final java.math.BigDecimal getHeightBigDecimal(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final java.math.BigDecimal getHeightBigDecimal()
public final double getWidthDouble(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final double getWidthDouble()
public final java.math.BigDecimal getWidthBigDecimal(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final java.math.BigDecimal getWidthBigDecimal()
public final boolean isInGrid(java.math.BigDecimal xBigDecimal, java.math.BigDecimal yBigDecimal, boolean handleOutOfMemoryError)
xBigDecimal
- The x-coordinate of the point.yBigDecimal
- The y-coordinate of the point.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final boolean isInGrid(java.math.BigDecimal xBigDecimal, java.math.BigDecimal yBigDecimal)
xBigDecimal
- The x-coordinate of the point.yBigDecimal
- The y-coordinate of the point.public final boolean isInGrid(double x, double y, boolean handleOutOfMemoryError)
x
- The x-coordinate of the point.y
- The y-coordinate of the point.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final boolean isInGrid(double x, double y)
x
- The x-coordinate of the point.y
- The y-coordinate of the point.public final boolean isInGrid(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
cellRowIndex
- The cell row index to test.cellColIndex
- The cell column index to test.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final boolean isInGrid(long cellRowIndex, long cellColIndex)
cellRowIndex
- The cell row index to test.cellColIndex
- The cell column index to test.public final boolean isInGrid(int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- The chunk row index to test.chunkColIndex
- The chunk column index to test.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final boolean isInGrid(int chunkRowIndex, int chunkColIndex)
chunkRowIndex
- The chunk row index to test.chunkColIndex
- The chunk column index to test.public final boolean isInGrid(Grid2DSquareCellAbstract.CellID cellID, boolean handleOutOfMemoryError)
cellID
- The CellID of a cell to test.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final boolean isInGrid(Grid2DSquareCellAbstract.CellID cellID)
cellID
- The CellID of a cell to test.public final boolean isInGrid(Grid2DSquareCellAbstract.ChunkID chunkID, boolean handleOutOfMemoryError)
chunkID
- The ChunkID of a cell to test.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final boolean isInGrid(Grid2DSquareCellAbstract.ChunkID chunkID)
chunkID
- The ChunkID of a cell to test.public final boolean isInGrid(int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex, boolean handleOutOfMemoryError)
chunkRowIndex
- chunkColIndex
- chunkCellRowIndex
- chunkCellColIndex
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final boolean isInGrid(int chunkRowIndex, int chunkColIndex, int chunkCellRowIndex, int chunkCellColIndex)
chunkRowIndex
- chunkColIndex
- chunkCellRowIndex
- chunkCellColIndex
- public final java.math.BigDecimal getCellXBigDecimal(long cellColIndex, boolean handleOutOfMemoryError)
cellColIndex
- The cell column index thats centroid x-coordinate is
returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final java.math.BigDecimal getCellXBigDecimal(long cellColIndex, int chunkRowIndex, int chunkColIndex)
cellColIndex
- The cell column index thats centroid x-coordinate is
returned.chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.protected final java.math.BigDecimal getCellXBigDecimal(long cellColIndex)
cellColIndex
- The cell column index thats centroid x-coordinate is
returned.public final double getCellXDouble(long cellColIndex, boolean handleOutOfMemoryError)
cellColIndex
- The cell column index thats centroid x-coordinate is
returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final double getCellXDouble(int chunkCellColIndex, int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
chunkCellColIndex
- The cell column index thats centroid x-coordinate is
returned.chunkRowIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final double getCellXDouble(int chunkCellColIndex, int chunkColIndex)
chunkCellColIndex
- The cell column index thats centroid x-coordinate is
returned.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.protected final double getCellXDouble(long cellColIndex)
cellColIndex
- The cell column index thats centroid x-coordinate is
returned.public final java.math.BigDecimal getCellXBigDecimal(Grid2DSquareCellAbstract.CellID cellID, boolean handleOutOfMemoryError)
cellID
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final java.math.BigDecimal getCellXBigDecimal(Grid2DSquareCellAbstract.CellID cellID, int chunkRowIndex, int chunkColIndex)
cellID
- The CellID of the cell thats centroid is returned.chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.protected final java.math.BigDecimal getCellXBigDecimal(Grid2DSquareCellAbstract.CellID cellID)
cellID
- public final double getCellXDouble(Grid2DSquareCellAbstract.CellID cellID, boolean handleOutOfMemoryError)
cellID
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final double getCellXDouble(Grid2DSquareCellAbstract.CellID cellID, int chunkRowIndex, int chunkColIndex)
cellID
- The CellID of the cell thats centroid is returned.chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.protected final double getCellXDouble(Grid2DSquareCellAbstract.CellID cellID)
cellID
- public final java.math.BigDecimal getCellYBigDecimal(long cellRowIndex, boolean handleOutOfMemoryError)
cellRowIndex
- the cell column index thats centroid y-coordinate is
returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final java.math.BigDecimal getCellYBigDecimal(long cellRowIndex, int chunkRowIndex, int chunkColIndex)
cellRowIndex
- the cell column index thats centroid y-coordinate is
returned.chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.protected final java.math.BigDecimal getCellYBigDecimal(long cellRowIndex)
cellRowIndex
- the cell column index thats centroid y-coordinate is
returned.public final double getCellYDouble(long cellRowIndex, boolean handleOutOfMemoryError)
cellRowIndex
- the cell column index thats centroid y-coordinate is
returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final double getCellYDouble(int chunkCellRowIndex, int chunkRowIndex, int chunkColIndex, boolean handleOutOfMemoryError)
chunkCellRowIndex
- the chunk cell column index thats centroid
y-coordinate is returned.chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final double getCellYDouble(int chunkCellRowIndex, int chunkRowIndex)
chunkCellRowIndex
- the chunk cell column index thats centroid
y-coordinate is returned.chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.protected final double getCellYDouble(long cellRowIndex)
cellRowIndex
- the cell column index thats centroid y-coordinate is
returned.public final java.math.BigDecimal getCellYBigDecimal(Grid2DSquareCellAbstract.CellID cellID, boolean handleOutOfMemoryError)
cellID
- The CellID of the cell thats centroid is returned.handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final java.math.BigDecimal getCellYBigDecimal(Grid2DSquareCellAbstract.CellID cellID, int chunkRowIndex, int chunkColIndex)
cellID
- The CellID of the cell thats centroid is returned.chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.protected final java.math.BigDecimal getCellYBigDecimal(Grid2DSquareCellAbstract.CellID cellID)
cellID
- The CellID of the cell thats centroid is returned.public final double getCellYDouble(Grid2DSquareCellAbstract.CellID cellID, boolean handleOutOfMemoryError)
cellID
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.public final double getCellYDouble(Grid2DSquareCellAbstract.CellID cellID, int chunkRowIndex, int chunkColIndex)
cellID
- The CellID of the cell thats centroid is returned.chunkRowIndex
- The chunk row index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.chunkColIndex
- The chunk column index of the
Grid2DSquareCellChunkAbstract not to be swapped if an OutOfMemoryError
is thrown.protected final double getCellYDouble(Grid2DSquareCellAbstract.CellID cellID)
cellID
- public final double[] getGridBounds(boolean handleOutOfMemoryError)
handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
TODO:
Are bounds in double range?
Is there more than cellsize difference with precision?
Throw appropriate exceptions.protected final double[] getGridBounds()
public final double[] getCellBoundsDoubleArray(long cellRowIndex, long cellColIndex, boolean handleOutOfMemoryError)
cellRowIndex
- the row index of the cell for which the bounds are
returnedcellColIndex
- the column index of the cell for which the bounds are
returnedhandleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.protected final double[] getCellBoundsDoubleArray(long cellRowIndex, long cellColIndex)
cellRowIndex
- the row index of the cell for which the bounds are
returnedcellColIndex
- the column index of the cell for which the bounds are
returnedpublic final double[] getCellBoundsDoubleArray(double x, double y, boolean handleOutOfMemoryError)
x
- the x-coordinate in the cell for which the bounds are returnedy
- the y-coordinate in the cell for which the bounds are returnedhandleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
TODO:
Precision may compromise result. More precision is available via
BigDecimal arithmetic.protected final double[] getCellBoundsDoubleArray(double x, double y)
x
- the x-coordinate in the cell for which the bounds are returnedy
- the y-coordinate in the cell for which the bounds are returned
TODO:
Precision may compromise result. More precision is available via
BigDecimal arithmetic.public abstract java.math.BigDecimal getNoDataValueBigDecimal(boolean handleOutOfMemoryError)
public Grid2DSquareCellAbstract.ChunkID getNextChunk(Grid2DSquareCellAbstract.ChunkID chunkID, int nChunkRows, int nChunkCols, boolean handleOutOfMemoryError)
chunkID
- nChunkRows
- nChunkCols
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
TODO:
Is it inefficient to pass in nChunkRows and nChunkCols since this has them already?protected Grid2DSquareCellAbstract.ChunkID getNextChunk(Grid2DSquareCellAbstract.ChunkID chunkID, int nChunkRows, int nChunkCols)
chunkID
- nChunkRows
- nChunkCols
- TODO:
Is it inefficient to pass in nChunkRows and nChunkCols since this has them already?public Grid2DSquareCellAbstract.ChunkID getNextChunkRowMinor(Grid2DSquareCellAbstract.ChunkID chunkID, int nChunkRows, int nChunkCols, boolean handleOutOfMemoryError)
chunkID
- nChunkRows
- nChunkCols
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
TODO:
Is it inefficient to pass in nChunkRows and nChunkCols since this has them already?protected Grid2DSquareCellAbstract.ChunkID getNextChunkRowMinor(Grid2DSquareCellAbstract.ChunkID chunkID, int nChunkRows, int nChunkCols)
chunkID
- nChunkRows
- nChunkCols
- TODO:
Is it inefficient to pass in nChunkRows and nChunkCols since this has them already?public Grid2DSquareCellAbstract.ChunkID getPreviousChunk(Grid2DSquareCellAbstract.ChunkID chunkID, int nChunkRows, int nChunkCols, boolean handleOutOfMemoryError)
chunkID
- nChunkRows
- nChunkCols
- handleOutOfMemoryError
- If true then OutOfMemoryErrors are caught, swap operations are initiated,
then the method is re-called.
If false then OutOfMemoryErrors are caught and thrown.
TODO:
Is it inefficient to pass in nChunkRows and nChunkCols since this has them already?protected Grid2DSquareCellAbstract.ChunkID getPreviousChunk(Grid2DSquareCellAbstract.ChunkID chunkID, int nChunkRows, int nChunkCols)
chunkID
- nChunkRows
- nChunkCols
- TODO:
Is it inefficient to pass in nChunkRows and nChunkCols since this has them already?
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |