uk.ac.leeds.ccg.andyt.grids.core
Class AbstractGridStatistics

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.core.AbstractGridStatistics
All Implemented Interfaces:
java.io.Serializable, GridStatisticsInterface
Direct Known Subclasses:
GridStatistics0, GridStatistics1

public abstract class AbstractGridStatistics
extends java.lang.Object
implements java.io.Serializable, GridStatisticsInterface

An abstract class to be extended and methods overridden to provide statistics about the data in AbstractGrid2DSquareCell and Grid2DSquareCellChunkAbstract more optimally.

See Also:
Serialized Form

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

_Grid2DSquareCell

protected AbstractGrid2DSquareCell _Grid2DSquareCell
A reference to the AbstractGrid2DSquareCell this is for.


nonNoDataValueCountBigInteger

protected java.math.BigInteger nonNoDataValueCountBigInteger
For storing the number of cells with non noDataValues.


sumBigDecimal

protected java.math.BigDecimal sumBigDecimal
For storing the sum of all non noDataValues as a BigDecimal.


minBigDecimal

protected java.math.BigDecimal minBigDecimal
For storing the minimum of all non noDataValues as a BigDecimal.


minCountBigInteger

protected java.math.BigInteger minCountBigInteger
For storing the number of min values as a BigInteger.


maxBigDecimal

protected java.math.BigDecimal maxBigDecimal
For storing the maximum of all non noDataValues as a BigDecimal.


maxCountBigInteger

protected java.math.BigInteger maxCountBigInteger
For storing the number of max values as a BigInteger.

Constructor Detail

AbstractGridStatistics

public AbstractGridStatistics()
Method Detail

init

protected void init()
For intitialisation


init

protected void init(AbstractGrid2DSquareCell grid2DSquareCell)
For intitialisation


update

protected void update(AbstractGridStatistics _GridStatistics)
Updates fields from _GridStatistics except this._Grid2DSquareCell

Parameters:
_GridStatistics - the _GridStatistics instance which fields are used to update this.

update

protected abstract void update()
Updates fields (statistics) by going through all values in this.grid2DSquareCellAbstract if they might not be up to date. (NB. After calling this it is inexpensive to convert to GridStatistics0.)


update

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. (NB. After calling this it is inexpensive to convert to GridStatistics0.) This is called from extending classes activated via update. It is here to avoid duplication in the code. The parameters are specified in order to distinguish this method from update().

Parameters:
_NRows - The number of rows in the grid.
_NCols - The number of columns in the grid.

toString

public java.lang.String toString(boolean handleOutOfMemoryError)
Returns a String describing this instance

Parameters:
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.

getName

protected java.lang.String getName()
Returns the name of the this class


getDescription

protected java.lang.String getDescription()
Returns a string describing this instance


getNonNoDataValueCountBigInteger

public final java.math.BigInteger getNonNoDataValueCountBigInteger(boolean handleOutOfMemoryError)
For returning the number of cells with noDataValues as a BigInteger.

Specified by:
getNonNoDataValueCountBigInteger in interface GridStatisticsInterface
Parameters:
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.

getNonNoDataValueCountBigInteger

protected abstract java.math.BigInteger getNonNoDataValueCountBigInteger()
For returning the number of cells with noDataValues as a BigInteger.


getNonNoDataValueCountLong

public final long getNonNoDataValueCountLong(boolean handleOutOfMemoryError)
For returning the number of cells with noDataValues as a long.

Specified by:
getNonNoDataValueCountLong in interface GridStatisticsInterface
Parameters:
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.

getNonNoDataValueCountLong

protected final long getNonNoDataValueCountLong()
For returning the number of cells with noDataValues as a long.


getNonNoDataValueCountInt

public final int getNonNoDataValueCountInt(boolean handleOutOfMemoryError)
For returning the number of cells with noDataValues as a int.

Specified by:
getNonNoDataValueCountInt in interface GridStatisticsInterface
Parameters:
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.

getNonNoDataValueCountInt

protected final int getNonNoDataValueCountInt()
For returning the number of cells with noDataValues as a int.


getSumBigDecimal

public final java.math.BigDecimal getSumBigDecimal(boolean handleOutOfMemoryError)
For returning the sum of all non noDataValues as a BigDecimal.

Specified by:
getSumBigDecimal in interface GridStatisticsInterface
Parameters:
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.

getSumBigDecimal

protected abstract java.math.BigDecimal getSumBigDecimal()
For returning the sum of all non noDataValues as a BigDecimal.


getSumBigInteger

public final java.math.BigInteger getSumBigInteger(boolean handleOutOfMemoryError)
For returning the sum of all non noDataValues as a BigInteger.

Specified by:
getSumBigInteger in interface GridStatisticsInterface
Parameters:
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.

getSumBigInteger

protected final java.math.BigInteger getSumBigInteger()
For returning the sum of all non noDataValues as a BigInteger.


getSumDouble

public final double getSumDouble(boolean handleOutOfMemoryError)
For returning the sum of all non noDataValues as a double.

Specified by:
getSumDouble in interface GridStatisticsInterface
Parameters:
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.

getSumDouble

protected final double getSumDouble()
For returning the sum of all non noDataValues as a double. If this.sumBigDecimal is to big/small to represent as a double then an Arithmetic Exception is thrown and Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY are returned as appropriate.


getSumLong

public final long getSumLong(boolean handleOutOfMemoryError)
For returning the sum of all non noDataValues as a long.

Specified by:
getSumLong in interface GridStatisticsInterface
Parameters:
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.

getSumLong

protected final long getSumLong()
For returning the sum of all non noDataValues as a long.


getSumInt

public final int getSumInt(boolean handleOutOfMemoryError)
For returning the sum of all non noDataValues as a int.

Specified by:
getSumInt in interface GridStatisticsInterface
Parameters:
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.

getSumInt

protected int getSumInt()
For returning the sum of all non noDataValues as a int.


getMinBigDecimal

public final java.math.BigDecimal getMinBigDecimal(boolean handleOutOfMemoryError)
For returning the minimum of all non noDataValues as a BigDecimal.

Specified by:
getMinBigDecimal in interface GridStatisticsInterface
Parameters:
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.

getMinBigDecimal

protected abstract java.math.BigDecimal getMinBigDecimal()
For returning the minimum of all non noDataValues as a BigInteger.


getMinBigInteger

public final java.math.BigInteger getMinBigInteger(boolean handleOutOfMemoryError)
For returning the minimum of all non noDataValues as a BigInteger.

Specified by:
getMinBigInteger in interface GridStatisticsInterface
Parameters:
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.

getMinBigInteger

protected final java.math.BigInteger getMinBigInteger()
For returning the minimum of all non noDataValues as a BigInteger.


getMinDouble

public final double getMinDouble(boolean handleOutOfMemoryError)
For returning the minimum of all non noDataValues as a double.

Specified by:
getMinDouble in interface GridStatisticsInterface
Parameters:
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.

getMinDouble

protected final double getMinDouble()
For returning the minimum of all non noDataValues as a double. If this.minBigDecimal is to big/small to represent as a double then an Arithmetic Exception is thrown and Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY are returned as appropriate.


getMinLong

public final long getMinLong(boolean handleOutOfMemoryError)
For returning the minimum of all non noDataValues as a long.

Specified by:
getMinLong in interface GridStatisticsInterface
Parameters:
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.

getMinLong

protected final long getMinLong()
For returning the minimum of all non noDataValues as a long


getMinInt

public final int getMinInt(boolean handleOutOfMemoryError)
For returning the minimum of all non noDataValues as a int.

Specified by:
getMinInt in interface GridStatisticsInterface
Parameters:
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.

getMinInt

protected final int getMinInt()
For returning the minimum of all non noDataValues as a int.


getMaxBigInteger

public final java.math.BigInteger getMaxBigInteger(boolean handleOutOfMemoryError)
For returning the maximum of all non noDataValues as a BigInteger.

Specified by:
getMaxBigInteger in interface GridStatisticsInterface
Parameters:
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.

getMaxBigInteger

protected final java.math.BigInteger getMaxBigInteger()
For returning the maximum of all non noDataValues as a BigInteger.


getMaxBigDecimal

public final java.math.BigDecimal getMaxBigDecimal(boolean handleOutOfMemoryError)
For returning the maximum of all non noDataValues as a BigDecimal.

Specified by:
getMaxBigDecimal in interface GridStatisticsInterface
Parameters:
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.

getMaxBigDecimal

protected abstract java.math.BigDecimal getMaxBigDecimal()
For returning the maximum of all non noDataValues as a BigInteger.


getMaxDouble

public final double getMaxDouble(boolean handleOutOfMemoryError)
For returning the maximum of all non noDataValues as a double.

Specified by:
getMaxDouble in interface GridStatisticsInterface
Parameters:
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.

getMaxDouble

protected final double getMaxDouble()
For returning the maximum of all non noDataValues as a double. If this.minBigDecimal is to big/small to represent as a double then an Arithmetic Exception is thrown and Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY are returned as appropriate.


getMaxLong

public final long getMaxLong(boolean handleOutOfMemoryError)
For returning the maximum of all non noDataValues as a long.

Specified by:
getMaxLong in interface GridStatisticsInterface
Parameters:
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.

getMaxLong

protected final long getMaxLong()
For returning the minimum of all non noDataValues as a long.


getMaxInt

public final int getMaxInt(boolean handleOutOfMemoryError)
For returning the maximum of all non noDataValues as a int.

Specified by:
getMaxInt in interface GridStatisticsInterface
Parameters:
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.

getMaxInt

protected final int getMaxInt()
For returning the minimum of all non noDataValues as a int.


getMode

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 ). TODO: Change for loops so as to look through each chunk in turn. Is it better to use toArray and go through a sorted version?


count

public 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.

Parameters:
row - The row index of the cell from which counting starts
col - 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.

count

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.

Parameters:
row - The row index of the cell from which counting starts
col - 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.

count

public 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.

Parameters:
row - The row index of the cell from which counting starts
col - 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.

count

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.

Parameters:
row - The row index of the cell from which counting starts
col - 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.

getArithmeticMeanBigDecimal

public java.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces,
                                                        boolean handleOutOfMemoryError)
For returning the arithmetic mean of all non noDataValues as a BigDecimal

Specified by:
getArithmeticMeanBigDecimal in interface GridStatisticsInterface
Parameters:
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.

getArithmeticMeanBigDecimal

protected abstract java.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
For returning the arithmetic mean of all non noDataValues as a BigDecimal

Parameters:
numberOfDecimalPlaces - The number of decimal places to which the result is precise.

getStandardDeviationBigDecimal

public java.math.BigDecimal getStandardDeviationBigDecimal(int numberOfDecimalPlaces,
                                                           boolean handleOutOfMemoryError)
Returns the standard deviation of all non noDataValues as a BigDecimal.

Parameters:
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.

getStandardDeviationBigDecimal

protected java.math.BigDecimal getStandardDeviationBigDecimal(int numberOfDecimalPlaces)
Returns the standard deviation of all non noDataValues as a double.

Parameters:
numberOfDecimalPlaces - The number of places for which the standard deviation will be correct. TODO: test