org.n52.operation
Class NdviAlgorithm

java.lang.Object
  extended by org.n52.math.AbstractAlgorithm
      extended by org.n52.operation.NdviAlgorithm
All Implemented Interfaces:
Algorithm

public class NdviAlgorithm
extends AbstractAlgorithm
implements Algorithm

NDVI. First example implementation for the interface Algorithm

Author:
Wim Koolhoven

Constructor Summary
NdviAlgorithm()
           
 
Method Summary
 double calculate(double[] params)
          calculates the result of the Algorithm for these parameters.
 java.lang.String getVersion()
          may return the version of the Algorithm.
 
Methods inherited from class org.n52.math.AbstractAlgorithm
getDescription, getDocURL, getName, getNrParams, getParamDescription, getParamName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.n52.math.Algorithm
getDescription, getDocURL, getName, getNrParams, getParamDescription, getParamName
 

Constructor Detail

NdviAlgorithm

public NdviAlgorithm()
Method Detail

getVersion

public java.lang.String getVersion()
Description copied from interface: Algorithm
may return the version of the Algorithm.

Specified by:
getVersion in interface Algorithm
Overrides:
getVersion in class AbstractAlgorithm

calculate

public double calculate(double[] params)
Description copied from interface: Algorithm
calculates the result of the Algorithm for these parameters. Calling the Algorithm multiple times with the same params has to be consistent

Specified by:
calculate in interface Algorithm
Parameters:
params - the Array has to have as many elements as specified with Algorithm.getNrParams()
Returns:
the result