Interface PermutationFullBinaryOperator

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PermutationFullBinaryOperator
A functional interface for defining custom binary operators on Permutations. See the Permutation.apply(PermutationFullBinaryOperator,Permutation) method. In this interface, the apply(int[], int[], org.cicirello.permutations.Permutation, org.cicirello.permutations.Permutation) method is passed both references to the raw arrays of ints that are encapsulated by the Permutations, as well as references to the original Permutation objects to enable utilizing the methods of the Permutation class. If the operator that you are implementing only requires the raw arrays of ints, then consider implementing the PermutationBinaryOperator interface instead.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(int[] rawPermutation1, int[] rawPermutation2, Permutation p1, Permutation p2)
    Applies an operator on the raw representations of a pair of Permutations.
  • Method Details

    • apply

      void apply(int[] rawPermutation1, int[] rawPermutation2, Permutation p1, Permutation p2)
      Applies an operator on the raw representations of a pair of Permutations. Implementers of this interface are responsible for ensuring that the apply method maintains valid permutations of the integers in {0, 1, ..., rawPermutation1.length - 1 }, and likewise for rawPermutation2.
      Parameters:
      rawPermutation1 - A reference to the raw array of ints underlying a Permutation object. Changes to this array will directly change the Permutation object that encapsulates it.
      rawPermutation2 - A reference to the raw array of ints underlying a Permutation object. Changes to this array will directly change the Permutation object that encapsulates it.
      p1 - A reference to the Permutation object that encapsulates rawPermutation1.
      p2 - A reference to the Permutation object that encapsulates rawPermutation2.