org.n52.math
Interface Algorithm

All Known Implementing Classes:
AbstractAlgorithm, CropAssimilationAlgorithm, NdviAlgorithm, RadianceFromDN, ReflectanceAlgorithm, SmacAlgorithm

public interface Algorithm

Interface intended to describe and structure algorithms to be used for one pixel at a time. The JAI calls these a PointOpImage

First implementation as discussed on 17-08-05 by Martin Schouwenburg, Jan Hendrikse and Wim Koolhoven

Author:
Wim Koolhoven

Method Summary
 double calculate(double[] params)
          calculates the result of the Algorithm for these parameters.
 java.lang.String getDescription()
          may return the Description of the Algorithm.
 java.lang.String getDocURL()
          may return an URL to Documentation about the Algorithm.
 java.lang.String getName()
          returns the Name of the Algorithm.
 int getNrParams()
          returns the number of parameters
 java.lang.String getParamDescription(int paramNr)
          may return a Description of the parameter.
 java.lang.String getParamName(int paramNr)
          returns the Name of the parameter
 java.lang.String getVersion()
          may return the version of the Algorithm.
 

Method Detail

getName

java.lang.String getName()
returns the Name of the Algorithm. This may not be NULL.


getDescription

java.lang.String getDescription()
may return the Description of the Algorithm. Intended to give the end user more information.


getDocURL

java.lang.String getDocURL()
may return an URL to Documentation about the Algorithm. Intended to show this documentation when the end user asks for help.


getVersion

java.lang.String getVersion()
may return the version of the Algorithm.


calculate

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

Parameters:
params - the Array has to have as many elements as specified with getNrParams()
Returns:
the result
Throws:
java.lang.RuntimeException

getNrParams

int getNrParams()
returns the number of parameters


getParamName

java.lang.String getParamName(int paramNr)
returns the Name of the parameter

Parameters:
paramNr - starts counting at 0
Returns:
the Name of parameter paramNr
Throws:
java.lang.IndexOutOfBoundsException - when paramNr is negative or larger or equal to {#getNrParams()}

getParamDescription

java.lang.String getParamDescription(int paramNr)
may return a Description of the parameter. Intended to give the end user more information.

Parameters:
paramNr - starts counting at 0
Returns:
the Name of parameter paramNr
Throws:
java.lang.IndexOutOfBoundsException - when paramNr is negative or larger or equal to {#getNrParams()}