@Deprecated public final class Interpolate extends Object
NOTE: This class is designed to be used primarily with the OpenSHA function classes and should probably be relocated to that package and given default visibility due to the lack of error-checking. We could write public methods that do thorough error checking.
Warning: These methods do no error checking for
null , empty, or single valued arrays; arrays of different lengths;
nor does it check that the supplied x-values are monotonically increasing
(sorted). Internally the method uses binary search and it is up to the user
to supply valid data.
| Modifier and Type | Method and Description |
|---|---|
static double |
findLogLogY(double[] xs,
double[] ys,
double x)
Deprecated.
Returns the log-log interpolated or extrapolated y-value using the supplied
x- and y-value arrays.
|
static double[] |
findLogLogY(double[] xs,
double[] ys,
double[] x)
Deprecated.
Returns the log-log interpolated or extrapolated y-values using the
supplied x- and y-value arrays.
|
static double |
findLogY(double[] xs,
double[] ys,
double x)
Deprecated.
Returns the log interpolated or extrapolated y-value using the supplied x-
and y-value arrays.
|
static double[] |
findLogY(double[] xs,
double[] ys,
double[] x)
Deprecated.
Returns the log interpolated or extrapolated y-values using the supplied x-
and y-value arrays.
|
static double |
findX(double x1,
double y1,
double x2,
double y2,
double y)
Deprecated.
Returns the interpolated or extrapolated x-value corresponding to the
supplied y-value.
|
static double |
findY(double[] xs,
double[] ys,
double x)
Deprecated.
Returns the interpolated or extrapolated y-value using the supplied x- and
y-value arrays.
|
static double[] |
findY(double[] xs,
double[] ys,
double[] x)
Deprecated.
Returns interpolated or extrapolated y-values using the supplied x- and
y-value arrays.
|
static double |
findY(double x1,
double y1,
double x2,
double y2,
double x)
Deprecated.
Returns the interpolated or extrapolated y-value corresponding to the
supplied x-value.
|
static double |
findY(List<Double> xs,
List<Double> ys,
double x)
Deprecated.
|
static double[] |
findY(List<Double> xs,
List<Double> ys,
double[] x)
Deprecated.
|
public static double findX(double x1,
double y1,
double x2,
double y2,
double y)
NaN, returned value will
also be NaN. Method does not do any input validation such that if
the supplied points are coincident or define a horizontal line, the method
may return Infinity, -Infinity, or NaN .x1 - x-value of first pointy1 - y-value of first pointx2 - x-value of second pointy2 - y-value of second pointy - value at which to find xpublic static double findY(double x1,
double y1,
double x2,
double y2,
double x)
NaN, returned value will
also be NaN. Method does not do any input validation such that if
the supplied points are coincident or define a vertical line, the method
may return Infinity, -Infinity, or NaN.x1 - x-value of first pointy1 - y-value of first pointx2 - x-value of second pointy2 - y-value of second pointx - value at which to find ypublic static double findY(double[] xs,
double[] ys,
double x)
xs - x-values of some functionys - y-values of some functionx - value at which to find ypublic static double findLogY(double[] xs,
double[] ys,
double x)
xs - x-values of some functionys - y-values of some functionx - value at which to find ypublic static double findLogLogY(double[] xs,
double[] ys,
double x)
xs - x-values of some functionys - y-values of some functionx - value at which to find ypublic static double[] findY(double[] xs,
double[] ys,
double[] x)
xs - x-values of some functionys - y-values of some functionx - value at which to find ypublic static double[] findLogY(double[] xs,
double[] ys,
double[] x)
xs - x-values of some functionys - y-values of some functionx - value at which to find ypublic static double[] findLogLogY(double[] xs,
double[] ys,
double[] x)
xs - x-values of some functionys - y-values of some functionx - value at which to find y