|
||||||||||
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.Grid2DSquareCellChunkAbstract uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellIntChunkAbstract uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellIntChunkMap
public class Grid2DSquareCellIntChunkMap
TODO: 1. Have a default value to use instead of noDataValue. 2. docs
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 |
Constructor Summary | |
---|---|
protected |
Grid2DSquareCellIntChunkMap()
Default constructor. |
protected |
Grid2DSquareCellIntChunkMap(Grid2DSquareCellIntChunkAbstract grid2DSquareCellIntChunk,
Grid2DSquareCellAbstract.ChunkID chunkID)
Creates a new Grid2DSquareCellIntChunkMap |
protected |
Grid2DSquareCellIntChunkMap(Grid2DSquareCellIntChunkAbstract grid2DSquareCellIntChunk,
Grid2DSquareCellAbstract.ChunkID chunkID,
int defaultValue)
Creates a new Grid2DSquareCellIntChunkMap |
protected |
Grid2DSquareCellIntChunkMap(Grid2DSquareCellInt grid2DSquareCellInt,
Grid2DSquareCellAbstract.ChunkID chunkID)
Creates a new Grid2DSquareCellIntChunkMap |
protected |
Grid2DSquareCellIntChunkMap(Grid2DSquareCellInt grid2DSquareCellInt,
Grid2DSquareCellAbstract.ChunkID chunkID,
int defaultValue)
Creates a new Grid2DSquareCellIntChunkMap |
Method Summary | |
---|---|
void |
clearData()
Clears the data associated with this. |
int |
getCell(Grid2DSquareCellChunkAbstract.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. |
java.math.BigInteger |
getNonNoDataValueCountBigInteger()
Returns the number of cells with non noDataValues as a BigInteger. |
java.math.BigDecimal |
getSum()
Returns the sum of all non noDataValues as a BigDecimal. |
protected void |
initCell(Grid2DSquareCellChunkAbstract.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. |
AbstractIterator |
iterator()
Returns an AbstractIterator for iterating over the cells in this. |
int |
setCell(Grid2DSquareCellChunkAbstract.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[]. |
java.lang.String |
toString()
Returns a description of this. |
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellIntChunkAbstract |
---|
getArithmeticMeanDouble, getCellDouble, getGrid2DSquareCellInt, getMaxInt, getMedianDouble, getMinInt, getModeTIntHashSet, getNonNoDataValueCountInt, getStandardDeviationDouble, getSumBigDecimal, initCells, sort1 |
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellChunkAbstract |
---|
getChunkID, getGrid2DSquareCell, getName, inChunk, initChunkID, initGrid2DSquareCell |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Grid2DSquareCellIntChunkMap()
protected Grid2DSquareCellIntChunkMap(Grid2DSquareCellInt grid2DSquareCellInt, Grid2DSquareCellAbstract.ChunkID chunkID)
grid2DSquareCellInt
- chunkID
- Default:
default value to grid2DSquareCellInt.getNoDataValue()protected Grid2DSquareCellIntChunkMap(Grid2DSquareCellInt grid2DSquareCellInt, Grid2DSquareCellAbstract.ChunkID chunkID, int defaultValue)
grid2DSquareCellInt
- chunkID
- defaultValue
- protected Grid2DSquareCellIntChunkMap(Grid2DSquareCellIntChunkAbstract grid2DSquareCellIntChunk, Grid2DSquareCellAbstract.ChunkID chunkID)
grid2DSquareCellIntChunk
- chunkID
- Default:
default value to grid2DSquareCellInt.getNoDataValue()
TODO:
Optimise for different types.protected Grid2DSquareCellIntChunkMap(Grid2DSquareCellIntChunkAbstract grid2DSquareCellIntChunk, Grid2DSquareCellAbstract.ChunkID chunkID, int defaultValue)
grid2DSquareCellIntChunk
- chunkID
- Default:
default value to grid2DSquareCellInt.getNoDataValue()
TODO:
Optimise for different types.Method Detail |
---|
public java.lang.String toString()
toString
in class Grid2DSquareCellChunkAbstract
public void initData()
initData
in class Grid2DSquareCellIntChunkAbstract
public gnu.trove.TIntObjectHashMap getData()
public void clearData()
clearData
in class Grid2DSquareCellIntChunkAbstract
public int[] toArrayIncludingNoDataValues()
toArrayIncludingNoDataValues
in class Grid2DSquareCellIntChunkAbstract
public int[] toArrayNotIncludingNoDataValues()
toArrayNotIncludingNoDataValues
in class Grid2DSquareCellIntChunkAbstract
public int getCell(int chunkCellRowIndex, int chunkCellColIndex, int noDataValue)
getCell
in class Grid2DSquareCellIntChunkAbstract
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(Grid2DSquareCellChunkAbstract.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 Grid2DSquareCellIntChunkAbstract
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(Grid2DSquareCellChunkAbstract.ChunkCellID chunkCellID, int valueToInitialise)
chunkCellID
- the Grid2DSquareCellIntChunkAbstract.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 Grid2DSquareCellIntChunkAbstract
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(Grid2DSquareCellChunkAbstract.ChunkCellID chunkCellID, int valueToSet)
chunkCellID
- the Grid2DSquareCellIntChunkAbstract.ChunkCellID of
the cell to be initialisedvalueToSet
- the value the cell is to be set topublic java.math.BigInteger getNonNoDataValueCountBigInteger()
getNonNoDataValueCountBigInteger
in class Grid2DSquareCellIntChunkAbstract
public java.math.BigDecimal getSum()
public AbstractIterator iterator()
iterator
in class Grid2DSquareCellChunkAbstract
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |