Interface ITuple

    • Method Detail

      • get

        java.lang.Object get​(int index)
        Returns:
        the element at the specified index
      • getElements

        java.lang.Object[] getElements()
        As the tuple is supposed to be immutable, do not modify the returned array.
        Returns:
        the array containing all elements of this Tuple
      • getDistinctElements

        <T> java.util.Set<T> getDistinctElements()
        Returns:
        the set containing all distinct elements of this Tuple, cast as type T
      • getSize

        int getSize()
        Returns:
        number of elements
      • invertIndex

        java.util.Map<java.lang.Object,​java.lang.Integer> invertIndex()
        Calculates an inverted index of the elements of this pattern. For each element, the index of the (last) occurrence is calculated.
        Returns:
        the inverted index mapping each element of this pattern to its index in the array
      • invertIndexWithMupliplicity

        java.util.Map<java.lang.Object,​java.util.List<java.lang.Integer>> invertIndexWithMupliplicity()
        Calculates an inverted index of the elements of this pattern. For each element, the index of all of its occurrences is calculated.
        Returns:
        the inverted index mapping each element of this pattern to its index in the array
      • toImmutable

        Tuple toImmutable()