- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface for defining custom unary operators on Permutations. See the
Permutation.apply(PermutationFullUnaryOperator)
method. In this interface, the apply(int[], org.cicirello.permutations.Permutation)
method is passed both a reference to the raw array of ints that is encapsulated by the
Permutation, as well as a reference to the Permutation object itself to enable utilizing the
methods of the Permutation
class. If the operator that you are implementing only requires
the raw array of ints, then consider implementing the PermutationUnaryOperator
interface
instead.-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(int[] rawPermutation, Permutation p) Applies an operator on the raw representation of a Permutation.
-
Method Details
-
apply
Applies an operator on the raw representation of a Permutation. Implementers of this interface are responsible for ensuring that the apply method maintains a valid permutation of the integers in {0, 1, ..., rawPermutation.length - 1 }.- Parameters:
rawPermutation
- 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.p
- A reference to the Permutation object that encapsulates it.
-