|
||||||||||
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.AbstractGrid2DSquareCellDoubleChunk
public abstract class AbstractGrid2DSquareCellDoubleChunk
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 | |
---|---|
AbstractGrid2DSquareCellDoubleChunk()
|
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()
Returns the Arithmetic Mean of all non _NoDataValues as a double. |
double |
getArithmeticMeanDouble(boolean handleOutOfMemoryError)
Returns the Arithmetic Mean of all non _NoDataValues as a double. |
protected abstract double |
getCell(int chunkCellRowIndex,
int chunkCellColIndex,
double _NoDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex, as a double. |
double |
getCell(int chunkCellRowIndex,
int chunkCellColIndex,
double noDataValue,
boolean handleOutOfMemoryError)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex, as a double. |
double |
getCell(int chunkCellRowIndex,
int chunkCellColIndex,
double _NoDataValue,
boolean handleOutOfMemoryError,
AbstractGrid2DSquareCell.ChunkID _ChunkID)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex, as a double. |
java.math.BigDecimal |
getCellBigDecimal(int chunkCellRowIndex,
int chunkCellColIndex,
double _NoDataValue,
boolean handleOutOfMemoryError)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex, as a BigDecimal. |
protected Grid2DSquareCellDouble |
getGrid2DSquareCellDouble()
|
Grid2DSquareCellDouble |
getGrid2DSquareCellDouble(boolean handleOutOfMemoryError)
|
protected double |
getMaxDouble()
Returns the maximum of all non _NoDataValues as a double. |
double |
getMaxDouble(boolean handleOutOfMemoryError)
Returns 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 double |
getMinDouble()
Returns the minimum of all non _NoDataValues as a double. |
double |
getMinDouble(boolean handleOutOfMemoryError)
Returns the minimum of all non _NoDataValues as a double. |
protected gnu.trove.TDoubleHashSet |
getModeTDoubleHashSet()
Returns the mode of all non _NoDataValues as a TDoubleHashSet. |
gnu.trove.TDoubleHashSet |
getModeTDoubleHashSet(boolean handleOutOfMemoryError)
Returns the mode of all non _NoDataValues as a TDoubleHashSet. |
protected java.math.BigInteger |
getNonNoDataValueCountBigInteger()
Returns the number of cells with _NoDataValues as a BigInteger. |
java.math.BigInteger |
getNonNoDataValueCountBigInteger(boolean handleOutOfMemoryError)
Returns 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()
Returns the sum of all non _NoDataValues as a BigDecimal. |
java.math.BigDecimal |
getSumBigDecimal(boolean handleOutOfMemoryError)
Returns the sum of all non _NoDataValues as a BigDecimal. |
protected abstract void |
initCell(int chunkCellRowIndex,
int chunkCellColIndex,
double valueToInitialise)
Initialises the value at position given by: chunk cell row chunkCellRowIndex; chunk cell column chunkCellColIndex. |
void |
initCell(int chunkCellRowIndex,
int chunkCellColIndex,
double valueToInitialise,
boolean handleOutOfMemoryError)
Initialises the value at position given by: chunk cell row chunkCellRowIndex; chunk cell column chunkCellColIndex. |
protected void |
initCells(Grid2DSquareCellDoubleChunkRAF grid2DSquareCellDoubleChunkRAF)
Initialises the value of this with those in the Grid2DSquareCellDoubleChunkRAF grid2DSquareCellDoubleChunkRAF. |
protected void |
initCells(Grid2DSquareCellDoubleChunkRAF grid2DSquareCellDoubleChunkRAF,
boolean handleOutOfMemoryError)
Initialises the value of this with those in the Grid2DSquareCellDoubleChunkRAF grid2DSquareCellDoubleChunkRAF. |
protected abstract void |
initData()
For initialising the data associated with this. |
protected abstract double |
setCell(int chunkCellRowIndex,
int chunkCellColIndex,
double valueToSet,
double _NoDataValue)
Returns the value at position given by: chunk cell row chunkCellRowIndex; chunk cell row chunkCellColIndex and sets it to valueToSet |
double |
setCell(int chunkCellRowIndex,
int chunkCellColIndex,
double valueToSet,
double _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(double[] x,
int off,
int len)
Sorts the specified sub-array of doubles into ascending order. |
protected double[] |
toArrayIncludingNoDataValues()
Returns all the values in row major order as a double[]. |
double[] |
toArrayIncludingNoDataValues(boolean handleOutOfMemoryError)
Returns all the values in row major order as a double[]. |
protected double[] |
toArrayNotIncludingNoDataValues()
Returns all the values in row major order as a double[]. |
double[] |
toArrayNotIncludingNoDataValues(boolean handleOutOfMemoryError)
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.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 AbstractGrid2DSquareCellDoubleChunk()
Method Detail |
---|
public Grid2DSquareCellDouble getGrid2DSquareCellDouble(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 Grid2DSquareCellDouble getGrid2DSquareCellDouble()
public double getCell(int chunkCellRowIndex, int chunkCellColIndex, double 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.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.public double getCell(int chunkCellRowIndex, int chunkCellColIndex, double _NoDataValue, boolean handleOutOfMemoryError, AbstractGrid2DSquareCell.ChunkID _ChunkID)
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.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._ChunkID
- This is a ChunkID for those AbstractGrid2DSquareCells not
to be swapped if possible when an OutOfMemoryError is encountered.protected abstract double getCell(int chunkCellRowIndex, int chunkCellColIndex, double _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.grid2DSquareCellDoublepublic java.math.BigDecimal getCellBigDecimal(int chunkCellRowIndex, int chunkCellColIndex, double _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.public void initCell(int chunkCellRowIndex, int chunkCellColIndex, double 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, double 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(Grid2DSquareCellDoubleChunkRAF grid2DSquareCellDoubleChunkRAF, boolean handleOutOfMemoryError)
grid2DSquareCellDoubleChunkRAF
- The Grid2DSquareCellDoubleChunkRAF
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(Grid2DSquareCellDoubleChunkRAF grid2DSquareCellDoubleChunkRAF)
grid2DSquareCellDoubleChunkRAF
- The Grid2DSquareCellDoubleChunkRAF
used to initialise this.public double setCell(int chunkCellRowIndex, int chunkCellColIndex, double valueToSet, double _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 double setCell(int chunkCellRowIndex, int chunkCellColIndex, double valueToSet, double _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 double[] 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 double[] toArrayIncludingNoDataValues()
public double[] 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 double[] 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 double getMinDouble(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 getMinDouble()
public double getMaxDouble(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 getMaxDouble()
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.TDoubleHashSet getModeTDoubleHashSet(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.TDoubleHashSet getModeTDoubleHashSet()
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(double[] 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 |