Package choreo.util
Class ChoreoArrayUtil
java.lang.Object
choreo.util.ChoreoArrayUtil
A Choreo Internal utility class for array operations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
zipEquals
(double[] arr1, double[] arr2, BiFunction<Double, Double, Boolean> check) Checks twodouble
arrays for equality with the given function.
-
Method Details
-
zipEquals
public static boolean zipEquals(double[] arr1, double[] arr2, BiFunction<Double, Double, Boolean> check) Checks twodouble
arrays for equality with the given function. This returns true if:- Either both arrays are null, or
- Neither is null, the arrays are the same length, and the given function returns true for all same-index pairs of elements in the arrays.
- Parameters:
arr1
- The first arrayarr2
- The second arraycheck
- The function to compare elements.- Returns:
- Whether the arrays are equal.
-