|
||||||||||
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.Grid2DSquareCellIntChunkAbstract
uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellIntChunk64CellMap
public class Grid2DSquareCellIntChunk64CellMap
Grid2DSquareCellIntChunkAbstract extension that stores cell values in a TIntLongHashMap. The maximum size of this Grid2DSquareCellIntChunkAbstract is 64 cells. TODO: Adjudicate when this is useful. What type of data?
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 | |
---|---|
|
Grid2DSquareCellIntChunk64CellMap()
Creates a new Grid2DSquareCellIntChunk64CellMap. |
protected |
Grid2DSquareCellIntChunk64CellMap(Grid2DSquareCellIntChunkAbstract grid2DSquareCellIntChunk,
Grid2DSquareCellAbstract.ChunkID chunkID)
Creates a new Grid2DSquareCellIntChunk64CellMap. |
protected |
Grid2DSquareCellIntChunk64CellMap(Grid2DSquareCellInt grid2DSquareCellInt,
Grid2DSquareCellAbstract.ChunkID chunkID)
/** Creates a new Grid2DSquareCellIntChunk64CellMap. |
Method Summary | |
---|---|
protected void |
clearData()
Clears the data associated with this. |
protected java.math.BigDecimal |
getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
For returning the Arithmetic Mean of all non noDataValues as a BigDecimal. |
protected int |
getCell(int chunkCellRowIndex,
int chunkCellColIndex,
int noDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex. |
protected gnu.trove.TIntLongHashMap |
getData()
Returns this.data TODO: This could be made public if a copy is returned! |
protected java.math.BigInteger |
getDiversity()
For returning the number of different values. |
protected java.math.BigDecimal |
getGeometricMeanBigDecimal()
For returning the Geometric Mean of all non noDataValues as a BigDecimal Warning! This is imprecise and it can happen that Math.pow does not return what might be expected! (For example, negative powers in the range (0,1) for negative numbers.) TODO: Develop a pow function such as com.ibm.icu.math.BigDecimal.pow This resource is not used here due to licensing, but it could be... |
protected java.math.BigDecimal |
getHarmonicMeanBigDecimal()
Returns the Harmonic Mean of all non noDataValues as a BigDecimal. |
protected int |
getMaxInt()
For returning the maximum of all non noDataValues as a int. |
protected double |
getMedianDouble()
For returning the median of all non noDataValues as a double |
protected int |
getMinInt()
For returning the minimum of all non noDataValues as a int. |
protected gnu.trove.TIntHashSet |
getModeTIntHashSet()
For returning the mode of all non noDataValues as a TDoubleHashSet |
protected java.math.BigInteger |
getNonNoDataValueCountBigInteger()
Returns the number of cells with noDataValues as a BigInteger |
protected int |
getNonNoDataValueCountInt()
Returns the number of cells with noDataValues as an int |
protected double |
getStandardDeviationDouble()
For returning the standard deviation of all non noDataValues as a double |
protected java.math.BigDecimal |
getSumBigDecimal()
For returning the sum of all non noDataValues as a BigDecimal |
protected void |
initCell(int chunkCellRowIndex,
int chunkCellColIndex,
int 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 Grid2DSquareCellIntChunk64CellMapIterator for iterating over the cells in this. |
protected long |
powerOf2(int value)
Returns 2 raised to the power of value as a long. |
long |
powerOf2(int value,
boolean handleOutOfMemoryError)
Returns 2 raised to the power of value as a long. |
protected 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 |
protected int[] |
toArrayIncludingNoDataValues()
Returns all the values in row major order as a double[]. |
protected int[] |
toArrayNotIncludingNoDataValues()
Returns all the values (not including noDataValues) in row major order as a double[]. |
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.Grid2DSquareCellIntChunkAbstract |
---|
getArithmeticMeanBigDecimal, getArithmeticMeanDouble, getArithmeticMeanDouble, getCell, getCellDouble, getGrid2DSquareCellInt, getMaxInt, getMedianDouble, getMinInt, getModeTIntHashSet, getNonNoDataValueCountBigInteger, getNonNoDataValueCountInt, getStandardDeviationDouble, getSumBigDecimal, initCell, initCells, initCells, setCell, sort1, toArrayIncludingNoDataValues, toArrayNotIncludingNoDataValues |
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 Grid2DSquareCellIntChunk64CellMap()
protected Grid2DSquareCellIntChunk64CellMap(Grid2DSquareCellInt grid2DSquareCellInt, Grid2DSquareCellAbstract.ChunkID chunkID)
grid2DSquareCellDouble
- The Grid2DSquareCellDouble this is a chunk
of.chunkID
- The ChunkID this will have.protected Grid2DSquareCellIntChunk64CellMap(Grid2DSquareCellIntChunkAbstract grid2DSquareCellIntChunk, Grid2DSquareCellAbstract.ChunkID chunkID)
grid2DSquareCellIntChunk
- The
Grid2DSquareCellIntChunkAbstract this is constructed from.chunkID
- The ChunkID this will have.Method Detail |
---|
protected void initData()
initData
in class Grid2DSquareCellIntChunkAbstract
protected void clearData()
clearData
in class Grid2DSquareCellIntChunkAbstract
protected gnu.trove.TIntLongHashMap getData()
protected int[] toArrayIncludingNoDataValues()
toArrayIncludingNoDataValues
in class Grid2DSquareCellIntChunkAbstract
protected int[] toArrayNotIncludingNoDataValues()
toArrayNotIncludingNoDataValues
in class Grid2DSquareCellIntChunkAbstract
protected 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 chunk.chunkCellColIndex
- The column index of the cell w.r.t. the origin
of this chunk.noDataValue
- The noDataValue of this.grid2DSquareCellInt.protected 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 chunk.chunkCellColIndex
- The column index of the cell w.r.t. the origin
of this chunk.valueToInitialise
- The value with which the cell is initialised.protected 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 tonoDataValue
- the noDataValue of this.grid2DSquareCellDoublepublic long powerOf2(int value, 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 long powerOf2(int value)
protected java.math.BigInteger getNonNoDataValueCountBigInteger()
getNonNoDataValueCountBigInteger
in class Grid2DSquareCellIntChunkAbstract
protected int getNonNoDataValueCountInt()
getNonNoDataValueCountInt
in class Grid2DSquareCellIntChunkAbstract
protected java.math.BigDecimal getSumBigDecimal()
getSumBigDecimal
in class Grid2DSquareCellIntChunkAbstract
protected int getMinInt()
getMinInt
in class Grid2DSquareCellIntChunkAbstract
protected int getMaxInt()
getMaxInt
in class Grid2DSquareCellIntChunkAbstract
protected java.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
getArithmeticMeanBigDecimal
in class Grid2DSquareCellIntChunkAbstract
numberOfDecimalPlaces
- The number of decimal places to which the
result is precise.protected java.math.BigDecimal getGeometricMeanBigDecimal()
protected java.math.BigDecimal getHarmonicMeanBigDecimal()
protected gnu.trove.TIntHashSet getModeTIntHashSet()
getModeTIntHashSet
in class Grid2DSquareCellIntChunkAbstract
protected double getMedianDouble()
getMedianDouble
in class Grid2DSquareCellIntChunkAbstract
protected double getStandardDeviationDouble()
getStandardDeviationDouble
in class Grid2DSquareCellIntChunkAbstract
protected java.math.BigInteger getDiversity()
protected IteratorAbstract iterator()
iterator
in class Grid2DSquareCellChunkAbstract
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |