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

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
      extended by uk.ac.leeds.ccg.andyt.grids.core.GridStatisticsAbstract
          extended by uk.ac.leeds.ccg.andyt.grids.core.GridStatistics1
All Implemented Interfaces:
java.io.Serializable, GridStatisticsInterface

public class GridStatistics1
extends GridStatisticsAbstract
implements java.io.Serializable

Used by Grid2DSquareCellAbstract instances to access statistics. The statistics are not initialised or kept up to date as the underlying data change.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.core.GridStatisticsAbstract
grid2DSquareCell, maxBigDecimal, maxCountBigInteger, minBigDecimal, minCountBigInteger, nonNoDataValueCountBigInteger, sumBigDecimal
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
handleOutOfMemoryErrorFalse, handleOutOfMemoryErrorTrue, memoryReserve
 
Constructor Summary
GridStatistics1()
          Creates a new instance of GridStatistics0
GridStatistics1(Grid2DSquareCellAbstract grid2DSquareCell)
          Creates a new instance of GridStatistics1
 
Method Summary
 java.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
          For returning the arithmetic mean of all non noDataValues as a BigDecimal Throws an ArithmeticException if nonNoDataValueCountBigInteger is equal to zero.
 boolean getIsUpToDate()
          Returns upToDate
 java.math.BigDecimal getMaxBigDecimal()
          For returning the maximum of all non noDataValues as a BigDecimal
 java.math.BigDecimal getMinBigDecimal()
          For returning the minimum of all non noDataValues as a BigDecimal
 java.lang.String getName()
          Returns the name of the this class
 java.math.BigInteger getNonNoDataValueCountBigInteger()
          For returning the number of cells with noDataValues as a BigInteger
 java.math.BigDecimal getSumBigDecimal()
          For returning the sum of all non noDataValues as a BigDecimal
 void setIsUpToDate(boolean isUpToDate)
          Sets this.isUpToDate to isUpToDate
 void update()
          Updates fields (statistics) by going through all values in this.grid2DSquareCellAbstract if they might not be up to date.
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.core.GridStatisticsAbstract
count, count, getMaxBigInteger, getMaxDouble, getMaxInt, getMaxLong, getMinBigInteger, getMinDouble, getMinInt, getMinLong, getMode, getNonNoDataValueCountInt, getNonNoDataValueCountLong, getStandardDeviationBigDecimal, getSumBigInteger, getSumDouble, getSumInt, getSumLong, init, init, toString, update, update
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
clearMemoryReserve, initMemoryReserve, initMemoryReserve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridStatistics1

public GridStatistics1()
Creates a new instance of GridStatistics0


GridStatistics1

public GridStatistics1(Grid2DSquareCellAbstract grid2DSquareCell)
Creates a new instance of GridStatistics1

Parameters:
grid2DSquareCell -
Method Detail

getIsUpToDate

public boolean getIsUpToDate()
Returns upToDate


setIsUpToDate

public void setIsUpToDate(boolean isUpToDate)
Sets this.isUpToDate to isUpToDate


update

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

Specified by:
update in class GridStatisticsAbstract

getNonNoDataValueCountBigInteger

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

Specified by:
getNonNoDataValueCountBigInteger in interface GridStatisticsInterface

getSumBigDecimal

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

Specified by:
getSumBigDecimal in interface GridStatisticsInterface

getMinBigDecimal

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

Specified by:
getMinBigDecimal in interface GridStatisticsInterface

getMaxBigDecimal

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

Specified by:
getMaxBigDecimal in interface GridStatisticsInterface

getArithmeticMeanBigDecimal

public java.math.BigDecimal getArithmeticMeanBigDecimal(int numberOfDecimalPlaces)
For returning the arithmetic mean of all non noDataValues as a BigDecimal Throws an ArithmeticException if nonNoDataValueCountBigInteger is equal to zero.

Specified by:
getArithmeticMeanBigDecimal in interface GridStatisticsInterface

getName

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

Specified by:
getName in class GridStatisticsAbstract