|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellChunk uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellIntChunk uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellIntChunkMap
public class Grid2DSquareCellIntChunkMap
AbstractGrid2DSquareCellIntChunk extension that stores cell values in a TIntObjectHashMap. TODO: Enable default value to be values other than noDataValue.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellChunk |
---|
AbstractGrid2DSquareCellChunk.ChunkCellID |
Field Summary |
---|
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellChunk |
---|
_ChunkID, _Grid2DSquareCell, isSwapUpToDate |
Constructor Summary | |
---|---|
|
Grid2DSquareCellIntChunkMap()
Default constructor. |
protected |
Grid2DSquareCellIntChunkMap(AbstractGrid2DSquareCellIntChunk grid2DSquareCellIntChunk,
AbstractGrid2DSquareCell.ChunkID _ChunkID)
Creates a new Grid2DSquareCellIntChunkMap |
protected |
Grid2DSquareCellIntChunkMap(AbstractGrid2DSquareCellIntChunk grid2DSquareCellIntChunk,
AbstractGrid2DSquareCell.ChunkID _ChunkID,
int defaultValue)
Creates a new Grid2DSquareCellIntChunkMap |
protected |
Grid2DSquareCellIntChunkMap(Grid2DSquareCellInt grid2DSquareCellInt,
AbstractGrid2DSquareCell.ChunkID _ChunkID)
Creates a new Grid2DSquareCellIntChunkMap |
protected |
Grid2DSquareCellIntChunkMap(Grid2DSquareCellInt grid2DSquareCellInt,
AbstractGrid2DSquareCell.ChunkID _ChunkID,
int defaultValue)
Creates a new Grid2DSquareCellIntChunkMap |
Method Summary | |
---|---|
void |
clearData()
Clears the data associated with this. |
int |
getCell(AbstractGrid2DSquareCellChunk.ChunkCellID chunkCellID,
int noDataValue)
Returns the value of cell with CellID given by chunkCellID |
int |
getCell(int chunkCellRowIndex,
int chunkCellColIndex,
int noDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex as a int. |
gnu.trove.TIntObjectHashMap |
getData()
Returns this.data. |
protected java.lang.String |
getDescription()
Returns a description of this. |
java.math.BigInteger |
getNonNoDataValueCountBigInteger()
Returns the number of cells with non noDataValues as a BigInteger. |
protected java.math.BigDecimal |
getSumBigDecimal()
Returns the sum of all non noDataValues as a BigDecimal. |
protected void |
initCell(AbstractGrid2DSquareCellChunk.ChunkCellID chunkCellID,
int valueToInitialise)
Initialises the value of the chunk referred to by chunkCellID to valueToInitialise. |
protected void |
initCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToInitialise)
Initialises the value at position given by: chunk cell row chunkCellRowIndex; chunk cell column chunkCellColIndex. |
void |
initData()
Initialises the data associated with this. |
protected AbstractIterator |
iterator()
Returns an AbstractIterator for iterating over the cells in this. |
int |
setCell(AbstractGrid2DSquareCellChunk.ChunkCellID chunkCellID,
int valueToSet)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell column chunkCellColIndex and sets it to valueToSet |
int |
setCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToSet,
int noDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell column chunkCellColIndex and sets it to valueToSet |
int[] |
toArrayIncludingNoDataValues()
Returns values in row major order as a int[]. |
int[] |
toArrayNotIncludingNoDataValues()
Returns non noDataValue in row major order as a int[]. |
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellChunk |
---|
getChunkID, getChunkID, 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 Grid2DSquareCellIntChunkMap()
protected Grid2DSquareCellIntChunkMap(Grid2DSquareCellInt grid2DSquareCellInt, AbstractGrid2DSquareCell.ChunkID _ChunkID)
grid2DSquareCellInt
- _ChunkID
- Default:
default value to grid2DSquareCellInt.getNoDataValue()protected Grid2DSquareCellIntChunkMap(Grid2DSquareCellInt grid2DSquareCellInt, AbstractGrid2DSquareCell.ChunkID _ChunkID, int defaultValue)
grid2DSquareCellInt
- _ChunkID
- defaultValue
- protected Grid2DSquareCellIntChunkMap(AbstractGrid2DSquareCellIntChunk grid2DSquareCellIntChunk, AbstractGrid2DSquareCell.ChunkID _ChunkID)
grid2DSquareCellIntChunk
- _ChunkID
- Default:
default value to grid2DSquareCellInt.getNoDataValue()
TODO:
Optimise for different types.protected Grid2DSquareCellIntChunkMap(AbstractGrid2DSquareCellIntChunk grid2DSquareCellIntChunk, AbstractGrid2DSquareCell.ChunkID _ChunkID, int defaultValue)
grid2DSquareCellIntChunk
- _ChunkID
- Default:
default value to grid2DSquareCellInt.getNoDataValue()
TODO:
Optimise for different types.Method Detail |
---|
protected java.lang.String getDescription()
getDescription
in class AbstractGrid2DSquareCellChunk
public void initData()
initData
in class AbstractGrid2DSquareCellIntChunk
public gnu.trove.TIntObjectHashMap getData()
public void clearData()
clearData
in class AbstractGrid2DSquareCellIntChunk
public int[] toArrayIncludingNoDataValues()
toArrayIncludingNoDataValues
in class AbstractGrid2DSquareCellIntChunk
public int[] toArrayNotIncludingNoDataValues()
toArrayNotIncludingNoDataValues
in class AbstractGrid2DSquareCellIntChunk
public int getCell(int chunkCellRowIndex, int chunkCellColIndex, int noDataValue)
getCell
in class AbstractGrid2DSquareCellIntChunk
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.grid2DSquareCellIntpublic int getCell(AbstractGrid2DSquareCellChunk.ChunkCellID chunkCellID, int noDataValue)
chunkCellID
- the chunk CellID of cell thats value is to be returnednoDataValue
- the noDataValue of this.grid2DSquareCellIntprotected void initCell(int chunkCellRowIndex, int chunkCellColIndex, int valueToInitialise)
initCell
in class AbstractGrid2DSquareCellIntChunk
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 void initCell(AbstractGrid2DSquareCellChunk.ChunkCellID chunkCellID, int valueToInitialise)
chunkCellID
- the AbstractGrid2DSquareCellIntChunk.ChunkCellID of
the cell to be initialisedvalueToInitialise
- the value with which the cell is initialisedpublic int setCell(int chunkCellRowIndex, int chunkCellColIndex, int valueToSet, int noDataValue)
setCell
in class AbstractGrid2DSquareCellIntChunk
chunkCellRowIndex
- The row index of the cell w.r.t. the origin of
this chunk.chunkCellColIndex
- The column index of the cell w.r.t. the origin
of this chunk.valueToSet
- The value the cell is to be set to.noDataValue
- The noDataValue of this.grid2DSquareCellInt.public int setCell(AbstractGrid2DSquareCellChunk.ChunkCellID chunkCellID, int valueToSet)
chunkCellID
- the AbstractGrid2DSquareCellIntChunk.ChunkCellID of
the cell to be initialisedvalueToSet
- the value the cell is to be set topublic java.math.BigInteger getNonNoDataValueCountBigInteger()
getNonNoDataValueCountBigInteger
in class AbstractGrid2DSquareCellIntChunk
protected java.math.BigDecimal getSumBigDecimal()
getSumBigDecimal
in class AbstractGrid2DSquareCellIntChunk
protected AbstractIterator iterator()
iterator
in class AbstractGrid2DSquareCellChunk
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |