Class Function

java.lang.Object
noaa.coastwatch.util.Function
All Implemented Interfaces:
Encodable
Direct Known Subclasses:
BivariateEstimator, EnhancementFunction, LagrangeInterpolator, NOAA1bReader.LongitudeInterpolator, UnivariateEstimator

public abstract class Function extends Object implements Encodable
A function takes a number of variables as input and produces an output value. The function may be thought of as f(X) where X = [x1, x2, ... xn].
Since:
3.1.0
Author:
Peter Hollemans
  • Constructor Details

    • Function

      public Function()
  • Method Details

    • evaluate

      public abstract double evaluate(double[] variables)
      Evalutes a function value with the specified inputs.
      Parameters:
      variables - the array of input variable values.
      Returns:
      the evaluated function value. If an error occurred during evaluation, the return value is Double.NaN.
    • getEncoding

      public Object getEncoding()
      Gets this object encoding. Override this function in the subclass for actual object encoding. This function simply returns the object.
      Specified by:
      getEncoding in interface Encodable
      Returns:
      the object encoding.
      See Also:
    • useEncoding

      public void useEncoding(Object obj)
      Uses the encoding to setup an instance of this object. Override this function in the subclass for actual object decoding. This function has no effect.
      Specified by:
      useEncoding in interface Encodable
      Parameters:
      obj - the object encoding.
      See Also: