|
||||||||||
| 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.AbstractGridStatistics
public abstract class AbstractGridStatistics
An abstract class to be extended and methods overridden to provide statistics about the data in AbstractGrid2DSquareCell and Grid2DSquareCellChunkAbstract more optimally.
| Field Summary | |
|---|---|
protected AbstractGrid2DSquareCell |
_Grid2DSquareCell
A reference to the AbstractGrid2DSquareCell this is for. |
protected java.math.BigDecimal |
maxBigDecimal
For storing the maximum of all non noDataValues as a BigDecimal. |
protected java.math.BigInteger |
maxCountBigInteger
For storing the number of max values as a BigInteger. |
protected java.math.BigDecimal |
minBigDecimal
For storing the minimum of all non noDataValues as a BigDecimal. |
protected java.math.BigInteger |
minCountBigInteger
For storing the number of min values as a BigInteger. |
protected java.math.BigInteger |
nonNoDataValueCountBigInteger
For storing the number of cells with non noDataValues. |
protected java.math.BigDecimal |
sumBigDecimal
For storing the sum of all non noDataValues as a BigDecimal. |
| Constructor Summary | |
|---|---|
AbstractGridStatistics()
|
|
| Method Summary | |
|---|---|
protected static long |
count(Grid2DSquareCellDouble grid2DSquareCellDouble,
long row,
long col,
long _NRows,
long _NCols,
double value)
Counts the remaining number of values in grid2DSquareCellDouble equal to value from cell given by row p and column q counting in row major order. |
long |
count(Grid2DSquareCellDouble grid2DSquareCellDouble,
long row,
long col,
long _NRows,
long _NCols,
double value,
boolean _HandleOutOfMemoryError)
Counts the remaining number of values in grid2DSquareCellDouble equal to value from cell given by row p and column q counting in row major order. |
protected static long |
count(Grid2DSquareCellInt grid2DSquareCellInt,
long row,
long col,
long _NRows,
long _NCols,
int value)
Counts the remaining number of values in grid2DSquareCellInt equal to value from cell given by row p and column q counting in row major order. |
long |
count(Grid2DSquareCellInt grid2DSquareCellInt,
long row,
long col,
long _NRows,
long _NCols,
int value,
boolean _HandleOutOfMemoryError)
Counts the remaining number of values in grid2DSquareCellInt equal to value from cell given by row p and column q counting in row major order. |
protected abstract java.math.BigDecimal |
getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
For returning the arithmetic mean of all non noDataValues as a BigDecimal |
java.math.BigDecimal |
getArithmeticMeanBigDecimal(int numberOfDecimalPlaces,
boolean _HandleOutOfMemoryError)
For returning the arithmetic mean of all non noDataValues as a BigDecimal |
protected java.lang.String |
getDescription()
Returns a string describing this instance |
protected abstract java.math.BigDecimal |
getMaxBigDecimal()
For returning the maximum of all non noDataValues as a BigInteger. |
java.math.BigDecimal |
getMaxBigDecimal(boolean _HandleOutOfMemoryError)
For returning the maximum of all non noDataValues as a BigDecimal. |
protected java.math.BigInteger |
getMaxBigInteger()
For returning the maximum of all non noDataValues as a BigInteger. |
java.math.BigInteger |
getMaxBigInteger(boolean _HandleOutOfMemoryError)
For returning the maximum of all non noDataValues as a BigInteger. |
protected double |
getMaxDouble()
For returning the maximum of all non noDataValues as a double. |
double |
getMaxDouble(boolean _HandleOutOfMemoryError)
For returning the maximum of all non noDataValues as a double. |
protected int |
getMaxInt()
For returning the minimum of all non noDataValues as a int. |
int |
getMaxInt(boolean _HandleOutOfMemoryError)
For returning the maximum of all non noDataValues as a int. |
protected long |
getMaxLong()
For returning the minimum of all non noDataValues as a long. |
long |
getMaxLong(boolean _HandleOutOfMemoryError)
For returning the maximum of all non noDataValues as a long. |
protected abstract java.math.BigDecimal |
getMinBigDecimal()
For returning the minimum of all non noDataValues as a BigInteger. |
java.math.BigDecimal |
getMinBigDecimal(boolean _HandleOutOfMemoryError)
For returning the minimum of all non noDataValues as a BigDecimal. |
protected java.math.BigInteger |
getMinBigInteger()
For returning the minimum of all non noDataValues as a BigInteger. |
java.math.BigInteger |
getMinBigInteger(boolean _HandleOutOfMemoryError)
For returning the minimum of all non noDataValues as a BigInteger. |
protected double |
getMinDouble()
For returning the minimum of all non noDataValues as a double. |
double |
getMinDouble(boolean _HandleOutOfMemoryError)
For returning the minimum 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 long |
getMinLong()
For returning the minimum of all non noDataValues as a long |
long |
getMinLong(boolean _HandleOutOfMemoryError)
For returning the minimum of all non noDataValues as a long. |
protected java.lang.Object |
getMode()
For returning the mode of all non noDataValues either as a TDoubleHashSet or as a TIntHashSet respectively depending on if ( this._Grid2DSquareCell.getClass() == Grid2DSquareCellInt.class ) or if ( this._Grid2DSquareCell.getClass() == Grid2DSquareCellDouble.class ). |
protected java.lang.String |
getName()
Returns the name of the this class |
protected abstract 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()
For returning the number of cells with noDataValues as a int. |
int |
getNonNoDataValueCountInt(boolean _HandleOutOfMemoryError)
For returning the number of cells with noDataValues as a int. |
protected long |
getNonNoDataValueCountLong()
For returning the number of cells with noDataValues as a long. |
long |
getNonNoDataValueCountLong(boolean _HandleOutOfMemoryError)
For returning the number of cells with noDataValues as a long. |
protected java.math.BigDecimal |
getStandardDeviationBigDecimal(int numberOfDecimalPlaces)
Returns the standard deviation of all non noDataValues as a double. |
java.math.BigDecimal |
getStandardDeviationBigDecimal(int numberOfDecimalPlaces,
boolean _HandleOutOfMemoryError)
Returns the standard deviation of all non noDataValues as a BigDecimal. |
protected abstract 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 java.math.BigInteger |
getSumBigInteger()
For returning the sum of all non noDataValues as a BigInteger. |
java.math.BigInteger |
getSumBigInteger(boolean _HandleOutOfMemoryError)
For returning the sum of all non noDataValues as a BigInteger. |
protected double |
getSumDouble()
For returning the sum of all non noDataValues as a double. |
double |
getSumDouble(boolean _HandleOutOfMemoryError)
For returning the sum of all non noDataValues as a double. |
protected int |
getSumInt()
For returning the sum of all non noDataValues as a int. |
int |
getSumInt(boolean _HandleOutOfMemoryError)
For returning the sum of all non noDataValues as a int. |
protected long |
getSumLong()
For returning the sum of all non noDataValues as a long. |
long |
getSumLong(boolean _HandleOutOfMemoryError)
For returning the sum of all non noDataValues as a long. |
protected void |
init()
For intitialisation |
protected void |
init(AbstractGrid2DSquareCell grid2DSquareCell)
For intitialisation |
java.lang.String |
toString(boolean _HandleOutOfMemoryError)
Returns a String describing this instance |
protected abstract void |
update()
Updates fields (statistics) by going through all values in this.grid2DSquareCellAbstract if they might not be up to date. |
protected void |
update(AbstractGridStatistics _GridStatistics)
Updates fields from _GridStatistics except this._Grid2DSquareCell |
protected void |
update(long _NRows,
long _NCols)
Updates fields (statistics) by going through all values in this.grid2DSquareCellAbstract if they might not be up to date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AbstractGrid2DSquareCell _Grid2DSquareCell
protected java.math.BigInteger nonNoDataValueCountBigInteger
protected java.math.BigDecimal sumBigDecimal
protected java.math.BigDecimal minBigDecimal
protected java.math.BigInteger minCountBigInteger
protected java.math.BigDecimal maxBigDecimal
protected java.math.BigInteger maxCountBigInteger
| Constructor Detail |
|---|
public AbstractGridStatistics()
| Method Detail |
|---|
protected void init()
protected void init(AbstractGrid2DSquareCell grid2DSquareCell)
protected void update(AbstractGridStatistics _GridStatistics)
_GridStatistics - the _GridStatistics instance which fields are used
to update this.protected abstract void update()
protected void update(long _NRows,
long _NCols)
_NRows - The number of rows in the grid._NCols - The number of columns in the grid.public java.lang.String toString(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.lang.String getName()
protected java.lang.String getDescription()
public final java.math.BigInteger getNonNoDataValueCountBigInteger(boolean _HandleOutOfMemoryError)
getNonNoDataValueCountBigInteger in interface GridStatisticsInterface_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 java.math.BigInteger getNonNoDataValueCountBigInteger()
public final long getNonNoDataValueCountLong(boolean _HandleOutOfMemoryError)
getNonNoDataValueCountLong in interface GridStatisticsInterface_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 final long getNonNoDataValueCountLong()
public final int getNonNoDataValueCountInt(boolean _HandleOutOfMemoryError)
getNonNoDataValueCountInt in interface GridStatisticsInterface_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 final int getNonNoDataValueCountInt()
public final java.math.BigDecimal getSumBigDecimal(boolean _HandleOutOfMemoryError)
getSumBigDecimal in interface GridStatisticsInterface_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 java.math.BigDecimal getSumBigDecimal()
public final java.math.BigInteger getSumBigInteger(boolean _HandleOutOfMemoryError)
getSumBigInteger in interface GridStatisticsInterface_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 final java.math.BigInteger getSumBigInteger()
public final double getSumDouble(boolean _HandleOutOfMemoryError)
getSumDouble in interface GridStatisticsInterface_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 final double getSumDouble()
public final long getSumLong(boolean _HandleOutOfMemoryError)
getSumLong in interface GridStatisticsInterface_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 final long getSumLong()
public final int getSumInt(boolean _HandleOutOfMemoryError)
getSumInt in interface GridStatisticsInterface_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 getSumInt()
public final java.math.BigDecimal getMinBigDecimal(boolean _HandleOutOfMemoryError)
getMinBigDecimal in interface GridStatisticsInterface_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 java.math.BigDecimal getMinBigDecimal()
public final java.math.BigInteger getMinBigInteger(boolean _HandleOutOfMemoryError)
getMinBigInteger in interface GridStatisticsInterface_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 final java.math.BigInteger getMinBigInteger()
public final double getMinDouble(boolean _HandleOutOfMemoryError)
getMinDouble in interface GridStatisticsInterface_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 final double getMinDouble()
public final long getMinLong(boolean _HandleOutOfMemoryError)
getMinLong in interface GridStatisticsInterface_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 final long getMinLong()
public final int getMinInt(boolean _HandleOutOfMemoryError)
getMinInt in interface GridStatisticsInterface_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 final int getMinInt()
public final java.math.BigInteger getMaxBigInteger(boolean _HandleOutOfMemoryError)
getMaxBigInteger in interface GridStatisticsInterface_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 final java.math.BigInteger getMaxBigInteger()
public final java.math.BigDecimal getMaxBigDecimal(boolean _HandleOutOfMemoryError)
getMaxBigDecimal in interface GridStatisticsInterface_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 java.math.BigDecimal getMaxBigDecimal()
public final double getMaxDouble(boolean _HandleOutOfMemoryError)
getMaxDouble in interface GridStatisticsInterface_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 final double getMaxDouble()
public final long getMaxLong(boolean _HandleOutOfMemoryError)
getMaxLong in interface GridStatisticsInterface_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 final long getMaxLong()
public final int getMaxInt(boolean _HandleOutOfMemoryError)
getMaxInt in interface GridStatisticsInterface_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 final int getMaxInt()
protected java.lang.Object getMode()
public long count(Grid2DSquareCellInt grid2DSquareCellInt,
long row,
long col,
long _NRows,
long _NCols,
int value,
boolean _HandleOutOfMemoryError)
row - The row index of the cell from which counting startscol - The column index of the cell from which counting starts_NRows - The number of rows in grid2DSquareCellInt._NCols - The number of columns in grid2DSquareCellInt.value - The value to be counted._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 static long count(Grid2DSquareCellInt grid2DSquareCellInt,
long row,
long col,
long _NRows,
long _NCols,
int value)
row - The row index of the cell from which counting startscol - The column index of the cell from which counting starts_NRows - The number of rows in grid2DSquareCellInt._NCols - The number of columns in grid2DSquareCellInt.value - The value to be counted.
public long count(Grid2DSquareCellDouble grid2DSquareCellDouble,
long row,
long col,
long _NRows,
long _NCols,
double value,
boolean _HandleOutOfMemoryError)
row - The row index of the cell from which counting startscol - The column index of the cell from which counting starts_NRows - The number of rows in grid2DSquareCellInt._NCols - The number of columns in grid2DSquareCellInt.value - The value to be counted._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 static long count(Grid2DSquareCellDouble grid2DSquareCellDouble,
long row,
long col,
long _NRows,
long _NCols,
double value)
row - The row index of the cell from which counting startscol - The column index of the cell from which counting starts_NRows - The number of rows in grid2DSquareCellInt._NCols - The number of columns in grid2DSquareCellInt.value - The value to be counted.
public java.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces,
boolean _HandleOutOfMemoryError)
getArithmeticMeanBigDecimal in interface GridStatisticsInterfacenumberOfDecimalPlaces - The number of places for which the standard
deviation will be correct._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 java.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
numberOfDecimalPlaces - The number of decimal places to which
the result is precise.
public java.math.BigDecimal getStandardDeviationBigDecimal(int numberOfDecimalPlaces,
boolean _HandleOutOfMemoryError)
numberOfDecimalPlaces - The number of places for which the standard
deviation will be correct._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 getStandardDeviationBigDecimal(int numberOfDecimalPlaces)
numberOfDecimalPlaces - The number of places for which the standard
deviation will be correct.
TODO:
test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||