|
||||||||||
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
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.grid2DSquareCellIntpublic 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.grid2DSquareCellInthandleOutOfMemoryError
- 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 initialisedhandleOutOfMemoryError
- 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 initialisedprotected 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.grid2DSquareCellDoublehandleOutOfMemoryError
- 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 AbstractGrid2DSquareCellChunk
protected abstract void initData()
initData
in class AbstractGrid2DSquareCellChunk
public 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 |