Package noaa.coastwatch.util
Class Function
java.lang.Object
noaa.coastwatch.util.Function
- All Implemented Interfaces:
Encodable
- Direct Known Subclasses:
BivariateEstimator
,EnhancementFunction
,LagrangeInterpolator
,NOAA1bReader.LongitudeInterpolator
,UnivariateEstimator
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract double
evaluate
(double[] variables) Evalutes a function value with the specified inputs.Gets this object encoding.void
useEncoding
(Object obj) Uses the encoding to setup an instance of this object.
-
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
Gets this object encoding. Override this function in the subclass for actual object encoding. This function simply returns the object.- Specified by:
getEncoding
in interfaceEncodable
- Returns:
- the object encoding.
- See Also:
-
useEncoding
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 interfaceEncodable
- Parameters:
obj
- the object encoding.- See Also:
-