Package choreo.util

Class ChoreoArrayUtil

java.lang.Object
choreo.util.ChoreoArrayUtil

public class ChoreoArrayUtil extends Object
A Choreo Internal utility class for array operations.
  • Method Details

    • zipEquals

      public static boolean zipEquals(double[] arr1, double[] arr2, BiFunction<Double,Double,Boolean> check)
      Checks two double 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 array
      arr2 - The second array
      check - The function to compare elements.
      Returns:
      Whether the arrays are equal.