Class TrilinearInterpolatingFunction
java.lang.Object
org.hipparchus.analysis.interpolation.TrilinearInterpolatingFunction
- All Implemented Interfaces:
Serializable,FieldTrivariateFunction,TrivariateFunction
public class TrilinearInterpolatingFunction
extends Object
implements TrivariateFunction, FieldTrivariateFunction, Serializable
Interpolate grid data using tri-linear interpolation.
This interpolator is thread-safe.
- Since:
- 4.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTrilinearInterpolatingFunction(double[] xVal, double[] yVal, double[] zVal, double[][][] fVal) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetXInf()Get the lowest grid x coordinate.doublegetXSup()Get the highest grid x coordinate.doublegetYInf()Get the lowest grid y coordinate.doublegetYSup()Get the highest grid y coordinate.doublegetZInf()Get the lowest grid z coordinate.doublegetZSup()Get the highest grid z coordinate.doublevalue(double x, double y, double z) Compute the value for the function.<T extends CalculusFieldElement<T>>
Tvalue(T x, T y, T z) Compute the value for the function.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hipparchus.analysis.FieldTrivariateFunction
toCalculusFieldTrivariateFunction
-
Constructor Details
-
TrilinearInterpolatingFunction
public TrilinearInterpolatingFunction(double[] xVal, double[] yVal, double[] zVal, double[][][] fVal) throws MathIllegalArgumentException Simple constructor.- Parameters:
xVal- All the x-coordinates of the interpolation points, sorted in increasing order.yVal- All the y-coordinates of the interpolation points, sorted in increasing order.zVal- All the z-coordinates of the interpolation points, sorted in increasing order.fVal- The values of the interpolation points on all the grid knots:fVal[i][j][k] = f(xVal[i], yVal[j], zVal[k]).- Throws:
MathIllegalArgumentException- if grid size is smaller than 2 or if the grid is not sorted in strict increasing order
-
-
Method Details
-
getXInf
public double getXInf()Get the lowest grid x coordinate.- Returns:
- lowest grid x coordinate
-
getXSup
public double getXSup()Get the highest grid x coordinate.- Returns:
- highest grid x coordinate
-
getYInf
public double getYInf()Get the lowest grid y coordinate.- Returns:
- lowest grid y coordinate
-
getYSup
public double getYSup()Get the highest grid y coordinate.- Returns:
- highest grid y coordinate
-
getZInf
public double getZInf()Get the lowest grid z coordinate.- Returns:
- lowest grid z coordinate
-
getZSup
public double getZSup()Get the highest grid z coordinate.- Returns:
- highest grid z coordinate
-
value
public double value(double x, double y, double z) Compute the value for the function.- Specified by:
valuein interfaceTrivariateFunction- Parameters:
x- x-coordinate for which the function value should be computed.y- y-coordinate for which the function value should be computed.z- z-coordinate for which the function value should be computed.- Returns:
- the value.
-
value
Compute the value for the function.- Specified by:
valuein interfaceFieldTrivariateFunction- Type Parameters:
T- type of the field elements- Parameters:
x- x-coordinate of the interpolation point.y- y-coordinate of the interpolation point.z- z-coordinate of the interpolation point.- Returns:
- the value.
- Since:
- 4.1
-