|
||||||||||
| 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.AbstractGrid2DSquareCellChunk
uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellIntChunk
public abstract class AbstractGrid2DSquareCellIntChunk
Provides general methods and controls what methods extended classes must implement acting as an interface.
| 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 | |
|---|---|
AbstractGrid2DSquareCellIntChunk()
|
|
| Method Summary | |
|---|---|
protected abstract void |
clearData()
For clearing the data associated with this. |
protected java.math.BigDecimal |
getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
Returns the Arithmetic Mean of all non noDataValues as a BigDecimal. |
java.math.BigDecimal |
getArithmeticMeanBigDecimal(int numberOfDecimalPlaces,
boolean _HandleOutOfMemoryError)
Returns the Arithmetic Mean of all non noDataValues as a BigDecimal. |
protected double |
getArithmeticMeanDouble()
For returning the Arithmetic Mean of all non noDataValues as a double. |
double |
getArithmeticMeanDouble(boolean _HandleOutOfMemoryError)
For returning the Arithmetic Mean of all non noDataValues as a double. |
protected abstract int |
getCell(int chunkCellRowIndex,
int chunkCellColIndex,
int noDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell col chunkCellColIndex as a int. |
int |
getCell(int chunkCellRowIndex,
int chunkCellColIndex,
int noDataValue,
boolean _HandleOutOfMemoryError)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex, as a double. |
double |
getCellDouble(int chunkCellRowIndex,
int chunkCellColIndex,
int noDataValue,
boolean _HandleOutOfMemoryError)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell col chunkCellColIndex as a double. |
protected Grid2DSquareCellInt |
getGrid2DSquareCellInt()
|
Grid2DSquareCellInt |
getGrid2DSquareCellInt(boolean _HandleOutOfMemoryError)
|
protected int |
getMaxInt()
For returning the maximum of all non noDataValues as a double. |
int |
getMaxInt(boolean _HandleOutOfMemoryError)
For returning the maximum of all non noDataValues as a double. |
protected double |
getMedianDouble()
Returns the median of all non noDataValues as a double. |
double |
getMedianDouble(boolean _HandleOutOfMemoryError)
Returns the median of all non noDataValues as a double. |
protected int |
getMinInt()
For returning the minimum of all non noDataValues as a int |
int |
getMinInt(boolean _HandleOutOfMemoryError)
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. |
gnu.trove.TIntHashSet |
getModeTIntHashSet(boolean _HandleOutOfMemoryError)
For returning the mode of all non noDataValues as a TDoubleHashSet. |
protected java.math.BigInteger |
getNonNoDataValueCountBigInteger()
For returning the number of cells with noDataValues as a BigInteger. |
java.math.BigInteger |
getNonNoDataValueCountBigInteger(boolean _HandleOutOfMemoryError)
For returning the number of cells with noDataValues as a BigInteger. |
protected int |
getNonNoDataValueCountInt()
Returns the number of cells with noDataValues as an int. |
int |
getNonNoDataValueCountInt(boolean _HandleOutOfMemoryError)
Returns the number of cells with noDataValues as an int. |
protected double |
getStandardDeviationDouble()
Returns the standard deviation of all non noDataValues as a double. |
double |
getStandardDeviationDouble(boolean _HandleOutOfMemoryError)
Returns 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. |
java.math.BigDecimal |
getSumBigDecimal(boolean _HandleOutOfMemoryError)
For returning the sum of all non noDataValues as a BigDecimal. |
protected abstract void |
initCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToInitialise)
Initialises the value at position given by: chunk cell row chunkCellRowIndex; chunk cell column chunkCellColIndex. |
void |
initCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToInitialise,
boolean _HandleOutOfMemoryError)
Initialises the value at position given by: chunk cell row chunkCellRowIndex; chunk cell column chunkCellColIndex. |
protected void |
initCells(Grid2DSquareCellIntChunkRAF grid2DSquareCellIntChunkRAF)
Initialises the value of this with those in the Grid2DSquareCellIntChunkRAF grid2DSquareCellIntChunkRAF. |
protected void |
initCells(Grid2DSquareCellIntChunkRAF grid2DSquareCellIntChunkRAF,
boolean _HandleOutOfMemoryError)
Initialises the value of this with those in the Grid2DSquareCellIntChunkRAF grid2DSquareCellIntChunkRAF. |
protected abstract void |
initData()
For initialising the data associated with this. |
protected abstract int |
setCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToSet,
int noDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex and sets it to valueToSet |
int |
setCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToSet,
int noDataValue,
boolean _HandleOutOfMemoryError)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex and sets it to valueToSet |
protected void |
sort1(int[] x,
int off,
int len)
Sorts the specified sub-array of doubles into ascending order. |
protected int[] |
toArrayIncludingNoDataValues()
Returns values in row major order as an int[]. |
int[] |
toArrayIncludingNoDataValues(boolean _HandleOutOfMemoryError)
Returns values in row major order as an int[]. |
protected int[] |
toArrayNotIncludingNoDataValues()
Returns values (except those that are noDataValues) in row major order as an int[]. |
int[] |
toArrayNotIncludingNoDataValues(boolean _HandleOutOfMemoryError)
Returns values (except those that are noDataValues) in row major order as an int[]. |
| Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCellChunk |
|---|
getChunkID, getChunkID, getDescription, getGrid2DSquareCell, getGrid2DSquareCell, getIsSwapUpToDate, getIsSwapUpToDate, getName, getName, inChunk, inChunk, initChunkID, initGrid2DSquareCell, iterator, 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 AbstractGrid2DSquareCellIntChunk()
| Method Detail |
|---|
public Grid2DSquareCellInt getGrid2DSquareCellInt(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 Grid2DSquareCellInt getGrid2DSquareCellInt()
public int getCell(int chunkCellRowIndex,
int chunkCellColIndex,
int noDataValue,
boolean _HandleOutOfMemoryError)
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.grid2DSquareCellDouble._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 abstract int getCell(int chunkCellRowIndex,
int chunkCellColIndex,
int noDataValue)
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.grid2DSquareCellInt
public double getCellDouble(int chunkCellRowIndex,
int chunkCellColIndex,
int noDataValue,
boolean _HandleOutOfMemoryError)
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.grid2DSquareCellInt_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:
Ensure the int can be represented exactly as a double. If not throw
Exception of some kind.
public void initCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToInitialise,
boolean _HandleOutOfMemoryError)
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 initialised_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 abstract void initCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToInitialise)
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 initialised
protected void initCells(Grid2DSquareCellIntChunkRAF grid2DSquareCellIntChunkRAF,
boolean _HandleOutOfMemoryError)
grid2DSquareCellIntChunkRAF - The Grid2DSquareCellIntChunkRAF
used to initialise this._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 initCells(Grid2DSquareCellIntChunkRAF grid2DSquareCellIntChunkRAF)
grid2DSquareCellIntChunkRAF - The Grid2DSquareCellIntChunkRAF
used to initialise this.
public int setCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToSet,
int noDataValue,
boolean _HandleOutOfMemoryError)
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.grid2DSquareCellDouble_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 abstract int setCell(int chunkCellRowIndex,
int chunkCellColIndex,
int valueToSet,
int noDataValue)
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 abstract void clearData()
clearData in class AbstractGrid2DSquareCellChunkprotected abstract void initData()
initData in class AbstractGrid2DSquareCellChunkpublic int[] toArrayIncludingNoDataValues(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 int[] toArrayIncludingNoDataValues()
public int[] toArrayNotIncludingNoDataValues(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 int[] toArrayNotIncludingNoDataValues()
public java.math.BigInteger getNonNoDataValueCountBigInteger(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.math.BigInteger getNonNoDataValueCountBigInteger()
public int getNonNoDataValueCountInt(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 int getNonNoDataValueCountInt()
public java.math.BigDecimal getSumBigDecimal(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.math.BigDecimal getSumBigDecimal()
public int getMinInt(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 int getMinInt()
public int getMaxInt(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 int getMaxInt()
public java.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces,
boolean _HandleOutOfMemoryError)
numberOfDecimalPlaces - The number of decimal places to which the
result is precise._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.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
numberOfDecimalPlaces - The number of decimal places to which the
result is precise.public double getArithmeticMeanDouble(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 double getArithmeticMeanDouble()
public gnu.trove.TIntHashSet getModeTIntHashSet(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 gnu.trove.TIntHashSet getModeTIntHashSet()
public double getMedianDouble(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 double getMedianDouble()
protected void sort1(int[] x,
int off,
int len)
public double getStandardDeviationDouble(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 double getStandardDeviationDouble()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||