Class BilinearInterpolator
java.lang.Object
com.irurueta.numerical.interpolation.BilinearInterpolator
Interpolation in two dimensions.
This is the simplest implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Length of x1v array.private final int
Length of x2v array.private final LinearInterpolator
One dimensional interpolator for x1v.private final LinearInterpolator
One dimensional interpolator for x2v.private final com.irurueta.algebra.Matrix
Matrix of tabulated function values yij. -
Constructor Summary
ConstructorsConstructorDescriptionBilinearInterpolator
(double[] x1v, double[] x2v, com.irurueta.algebra.Matrix ym) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
getM()
Gets length of x1v array.int
getN()
Gets length of x2v array.double
interpolate
(double x1p, double x2p) Given values x1p an x2p, returns an interpolated value.
-
Field Details
-
m
private final int mLength of x1v array. -
n
private final int nLength of x2v array. -
y
private final com.irurueta.algebra.Matrix yMatrix of tabulated function values yij. -
x1terp
One dimensional interpolator for x1v. -
x2terp
One dimensional interpolator for x2v.
-
-
Constructor Details
-
BilinearInterpolator
public BilinearInterpolator(double[] x1v, double[] x2v, com.irurueta.algebra.Matrix ym) Constructor.- Parameters:
x1v
- array of x1v.x2v
- array of x2v.ym
- matrix of tabulated function values yij.
-
-
Method Details
-
getM
public int getM()Gets length of x1v array.- Returns:
- length of x1v array.
-
getN
public int getN()Gets length of x2v array.- Returns:
- length of x2v array.
-
interpolate
public double interpolate(double x1p, double x2p) Given values x1p an x2p, returns an interpolated value.- Parameters:
x1p
- x1p value where interpolation is estimated.x2p
- x2p value where interpolation is estimated.- Returns:
- interpolated value.
-