public final class DoubleArrayUtilities
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
arrayFunctionalFill(java.util.function.DoubleUnaryOperator function,
double[] dataArray,
double[] arrayToFill)
fills array with function and supporting data array
|
static void |
arrayTransform(java.util.function.DoubleUnaryOperator function,
double[] array)
transforms array with function
|
static int |
binarySearch(double xValue,
double[] xArray)
returns the index of xValue in xArray, or the first bounding index
data expected to be monotonic
|
static double[] |
copyArray(double[] array) |
static double[][] |
copyArray(double[][] array) |
static boolean |
enforceMontonicallyDecreasing(double[] array,
int middleIndex) |
static void |
enforceMontonicallyIncreasing(double[] array,
int middleIndex) |
static java.lang.Double |
interpolate(java.lang.Double x,
java.lang.Double x1,
java.lang.Double y1,
java.lang.Double x2,
java.lang.Double y2)
linear interpolation.
|
static double |
interpolatePairedArrays(double xValue,
double[] xArray,
double[] yArray)
interpolates the value in the yArray, based on the location of xValue in
the xArray linearly
xArray be either monotonically increasing or decreasing.
|
static double[] |
linearInterpolationFill(int numOrdinates,
double first,
double last)
fill array with
|
public static double interpolatePairedArrays(double xValue,
double[] xArray,
double[] yArray)
xValue - xArray - yArray - arraysIncreasing - public static int binarySearch(double xValue,
double[] xArray)
xValue - xArray - public static boolean enforceMontonicallyDecreasing(double[] array,
int middleIndex)
public static void enforceMontonicallyIncreasing(double[] array,
int middleIndex)
public static double[] linearInterpolationFill(int numOrdinates,
double first,
double last)
array - public static java.lang.Double interpolate(java.lang.Double x,
java.lang.Double x1,
java.lang.Double y1,
java.lang.Double x2,
java.lang.Double y2)
x - x1 - y1 - x2 - y2 - public static void arrayTransform(java.util.function.DoubleUnaryOperator function,
double[] array)
function - array - public static void arrayFunctionalFill(java.util.function.DoubleUnaryOperator function,
double[] dataArray,
double[] arrayToFill)
function - dataArray - arrayToFill - public static double[][] copyArray(double[][] array)
public static double[] copyArray(double[] array)
frequencies -