|
||||||||||
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.Grid2DSquareCellChunkAbstract
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleChunkAbstract
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellDoubleChunkArray
public class Grid2DSquareCellDoubleChunkArray
Grid2DSquareCellDoubleChunkAbstract extension that stores cell values in a double[][].
Nested Class Summary |
---|
Nested classes/interfaces inherited from class uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellChunkAbstract |
---|
Grid2DSquareCellChunkAbstract.ChunkCellID |
Field Summary |
---|
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellChunkAbstract |
---|
chunkID, grid2DSquareCell, isSwapUpToDate |
Constructor Summary | |
---|---|
|
Grid2DSquareCellDoubleChunkArray()
Creates a new Grid2DSquareCellDoubleChunkArray. |
protected |
Grid2DSquareCellDoubleChunkArray(Grid2DSquareCellDoubleChunkAbstract grid2DSquareCellDoubleChunk,
Grid2DSquareCellAbstract.ChunkID chunkID)
Creates a new Grid2DSquareCellDoubleChunkArray from grid2DSquareCellDoubleChunk. |
protected |
Grid2DSquareCellDoubleChunkArray(Grid2DSquareCellDouble grid2DSquareCellDouble,
Grid2DSquareCellAbstract.ChunkID chunkID)
Creates a new Grid2DSquareCellDoubleChunkArray for grid2DSquareCellDouble containing all no data values. |
Method Summary | |
---|---|
protected void |
clearData()
Clears the data associated with this. |
protected double |
getCell(int chunkCellRowIndex,
int chunkCellColIndex,
double noDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex. |
protected double[][] |
getData()
Returns this.data. |
protected void |
initCell(int chunkCellRowIndex,
int chunkCellColIndex,
double valueToInitialise)
Initialises the value at position given by: chunk cell row chunkCellRowIndex; chunk cell column chunkCellColIndex. |
protected void |
initData()
Initialises the data associated with this. |
protected IteratorAbstract |
iterator()
Returns a Grid2DSquareCellDoubleChunkArrayIterator for iterating over the cells in this. |
protected double |
setCell(int chunkCellRowIndex,
int chunkCellColIndex,
double valueToSet,
double noDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex and sets it to valueToSet |
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellChunkAbstract |
---|
getChunkID, getChunkID, getDescription, getGrid2DSquareCell, getGrid2DSquareCell, getIsSwapUpToDate, getIsSwapUpToDate, getName, getName, inChunk, inChunk, initChunkID, initGrid2DSquareCell, iterator, setIsSwapUpToDate, setIsSwapUpToDate, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Grid2DSquareCellDoubleChunkArray()
protected Grid2DSquareCellDoubleChunkArray(Grid2DSquareCellDouble grid2DSquareCellDouble, Grid2DSquareCellAbstract.ChunkID chunkID)
grid2DSquareCellDouble
- The Grid2DSquareCellDouble this is
to be a chunk of.chunkID
- The ChunkID to be this.chunkID.protected Grid2DSquareCellDoubleChunkArray(Grid2DSquareCellDoubleChunkAbstract grid2DSquareCellDoubleChunk, Grid2DSquareCellAbstract.ChunkID chunkID)
grid2DSquareCellDoubleChunk
- The Grid2DSquareCellDoubleChunk this
values are taken from.chunkID
- The ChunkID to be this.chunkID.
TODO:
A fast toArray() method in Grid2DSquareCellDoubleChunkMap could be coded
then a constructor based on an double[] or double[][] might be faster?Method Detail |
---|
protected void initData()
initData
in class Grid2DSquareCellDoubleChunkAbstract
protected double[][] getData()
protected void clearData()
clearData
in class Grid2DSquareCellDoubleChunkAbstract
protected double getCell(int chunkCellRowIndex, int chunkCellColIndex, double noDataValue)
getCell
in class Grid2DSquareCellDoubleChunkAbstract
chunkCellRowIndex
- the row index of the cell w.r.t. the origin of this chunkchunkCellColIndex
- the column index of the cell w.r.t. the origin of this chunknoDataValue
- the noDataValue of this.grid2DSquareCellDoubleprotected void initCell(int chunkCellRowIndex, int chunkCellColIndex, double valueToInitialise)
initCell
in class Grid2DSquareCellDoubleChunkAbstract
chunkCellRowIndex
- the row index of the cell w.r.t. the origin of this chunkchunkCellColIndex
- the column index of the cell w.r.t. the origin of this chunkvalueToInitialise
- the value with which the cell is initialisedprotected double setCell(int chunkCellRowIndex, int chunkCellColIndex, double valueToSet, double noDataValue)
setCell
in class Grid2DSquareCellDoubleChunkAbstract
chunkCellRowIndex
- the row index of the cell w.r.t. the origin of this chunkchunkCellColIndex
- the column index of the cell w.r.t. the origin of this chunkvalueToSet
- the value the cell is to be set tonoDataValue
- the noDataValue of this.grid2DSquareCellDoubleprotected IteratorAbstract iterator()
iterator
in class Grid2DSquareCellChunkAbstract
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |