Class TupleUtil


  • public final class TupleUtil
    extends Object
    Utilities for tuples that are represented by two separate integer arrays. One array represents the parameters and the other array represents the parameter values.
    • Method Detail

      • tuplesAreEqual

        public static boolean tuplesAreEqual​(int[] parameters,
                                             int[] values,
                                             int[] otherParameters,
                                             int[] otherValues)
        Checks if two tuples are equal. For example, parameters=[0, 1], values=[0,1] and otherParameters=[1,0], otherValues=[1,0] are equal because the value for parameter no. 0 is 0 in both tuples and the value for parameter no. 1 is 1 in both tuples.
        Parameters:
        parameters - Parameters of the first tuple
        values - Values of the first tuple
        otherParameters - Parameters of the second tuple
        otherValues - Values of the second tuple
        Returns:
        true if the tuples are equal. Otherwise, false.