Permutation class
Class to represent a permutation for a subset of the natural numbers.
Constructors
-
Permutation(List<
int> indices) -
Initializes a new instance of the Permutation class within an array which
represents where each integer is permuted too:
indices
[i] represents that integer i is permuted to locationindices
[i]. -
Permutation.fromInversions(List<
int> inv)
Properties
Methods
-
inverse(
) → Permutation - Computes the inverse of the permutation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toInversions(
) → List< int> - Construct a sequence of inversions from the permutation.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int idx) → int -
Computes where
idx
permutes too.