org.geotools.feature.visitor
Class StandardDeviationVisitor
java.lang.Object
org.geotools.feature.visitor.StandardDeviationVisitor
- All Implemented Interfaces:
- FeatureCalc, org.opengis.feature.FeatureVisitor
public class StandardDeviationVisitor
- extends java.lang.Object
- implements FeatureCalc
Determines the standard deviation.
----------------------------
| 1 ---
Std dev = | ___ \ ( x - mean ) ^ 2
\| N /__
aka std dev = sqrt((sum((x-mean)^2))/N) where N is the number of samples
- Author:
- Cory Horner, Refractions Research Inc.
Method Summary |
int |
getNaNCount()
|
int |
getNullCount()
|
CalcResult |
getResult()
Returns the result of the calculation as a handy object which can be merged and modified. |
void |
init(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection)
|
void |
reset()
|
void |
visit(org.opengis.feature.Feature feature)
|
void |
visit(org.opengis.feature.simple.SimpleFeature feature)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StandardDeviationVisitor
public StandardDeviationVisitor(org.opengis.filter.expression.Expression expr,
double average)
init
public void init(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection)
getResult
public CalcResult getResult()
- Description copied from interface:
FeatureCalc
- Returns the result of the calculation as a handy object which can be merged and modified.
- Specified by:
getResult
in interface FeatureCalc
- Returns:
- the results of the calculation
visit
public void visit(org.opengis.feature.simple.SimpleFeature feature)
visit
public void visit(org.opengis.feature.Feature feature)
- Specified by:
visit
in interface org.opengis.feature.FeatureVisitor
reset
public void reset()
getNaNCount
public int getNaNCount()
- Returns:
- the number of features which returned a NaN
getNullCount
public int getNullCount()
- Returns:
- the number of features which returned a null
Copyright © 1996-2010 Geotools. All Rights Reserved.