cc.redberry.core.groups.permutations
Interface Permutation
-
- All Superinterfaces:
- java.lang.Comparable<Permutation>
- All Known Implementing Classes:
- PermutationOneLineByte, PermutationOneLineInt, PermutationOneLineShort
public interface Permutation extends java.lang.Comparable<Permutation>
Interface describing a single permutation. SeePermutations.createPermutation(boolean, int[])andPermutations.createPermutation(boolean, int[][])on how to construct permutations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanantisymmetry()Returns true if this permutation is antisymmetry and false otherwise.Permutationcommutator(Permutation p)Returns commutator of this and specified permutation, i.e.Permutationcomposition(Permutation other)Returns the result ofthis * other.Permutationcomposition(Permutation a, Permutation b)Returns the result ofthis * a * b.Permutationcomposition(Permutation a, Permutation b, Permutation c)Returns the result ofthis * a * b * c.PermutationcompositionWithInverse(Permutation other)Returns the result ofthis * other.inverse().Permutationconjugate(Permutation p)Returns conjugation of specified element by this permutation, i.e.int[][]cycles()Returns an array of disjoint cycles that represent this permutation.intdegree()Returns a largest moved point plus one.PermutationgetIdentity()Returns the identity permutation with the degree of this permutationintimageOf(int i)Returns image of specified point under the action of this permutation.int[]imageOf(int[] set)Returns image of specified set of points under the action of this permutation.Permutationinverse()Returns the inverse permutation of this.booleanisIdentity()Returnstrueif this represents identity permutationintlength()Returns length of the underlying array (at low-level).int[]lengthsOfCycles()Returns lengths of cycles in disjoint cycle notation.PermutationmoveRight(int size)Inserts identity action on the set [0, 1, ..., size - 1]; as result the degree of resulting permutation will be size + degree of this.Permutationnegate()Changes sign (symmetry to antisymmetry and vice versa) of this permutationintnewIndexOf(int i)Returns image of specified point under the action of this permutation.intnewIndexOfUnderInverse(int i)Returns image of specified point under the action of inverse of this permutation.int[]oneLine()Returns array that represents this permutation in one-line notation.IntArrayoneLineImmutable()Returns immutable array that represents this permutation in one-line notation.java.math.BigIntegerorder()Calculates and returns the order of this permutation.booleanorderIsOdd()Returns true if order of this permutation is odd and false otherwise.intparity()Returns parity of this permutations.char[]permute(char[] array)Permutes array and returns the result.int[]permute(int[] array)Permutes array and returns the result.<T> java.util.List<T>permute(java.util.List<T> array)Permutes list and returns the result.<T> T[]permute(T[] array)Permutes array and returns the result.Permutationpow(int exponent)Returns this raised to the specified exponent.java.lang.StringtoStringCycles()Returns a string representation of this permutation in disjoint cycles notation.java.lang.StringtoStringOneLine()Returns a string representation of this permutation in one-line notation.PermutationtoSymmetry()If this is antisymmetry, then converts this permutation to symmetry.
-
-
-
Method Detail
-
oneLine
int[] oneLine()
Returns array that represents this permutation in one-line notation.- Returns:
- array that represents this permutation in one-line notation
-
oneLineImmutable
IntArray oneLineImmutable()
Returns immutable array that represents this permutation in one-line notation.- Returns:
- immutable array that represents this permutation in one-line notation
-
cycles
int[][] cycles()
Returns an array of disjoint cycles that represent this permutation.- Returns:
- array of disjoint cycles that represent this permutation
-
newIndexOf
int newIndexOf(int i)
Returns image of specified point under the action of this permutation.- Parameters:
i- point- Returns:
- image of specified point under the action of this permutation
-
imageOf
int imageOf(int i)
Returns image of specified point under the action of this permutation. This method is absolutely same asnewIndexOf(int)without any difference.- Parameters:
i- point- Returns:
- image of specified point under the action of this permutation
-
imageOf
int[] imageOf(int[] set)
Returns image of specified set of points under the action of this permutation.- Parameters:
set- set- Returns:
- image of specified set under this permutation
-
permute
int[] permute(int[] array)
Permutes array and returns the result.- Parameters:
array- array- Returns:
- permuted array
-
permute
char[] permute(char[] array)
Permutes array and returns the result.- Parameters:
array- array- Returns:
- permuted array
-
permute
<T> T[] permute(T[] array)
Permutes array and returns the result.- Parameters:
array- array- Returns:
- permuted array
-
permute
<T> java.util.List<T> permute(java.util.List<T> array)
Permutes list and returns the result.- Parameters:
array- array- Returns:
- permuted array
-
conjugate
Permutation conjugate(Permutation p)
Returns conjugation of specified element by this permutation, i.e. this^-1 * p * this- Parameters:
p- permutation- Returns:
- conjugation of specified element by this permutation, i.e. this^-1 * p * this
- Throws:
InconsistentGeneratorsException- if the result of composition is inconsistent symmetry (antisymmetry with odd parity of permutation)
-
commutator
Permutation commutator(Permutation p)
Returns commutator of this and specified permutation, i.e. this^-1 * p^-1 * this * p.- Parameters:
p- permutation- Returns:
- commutator of this and specified permutation, i.e. this^-1 * p^-1 * this * p
- Throws:
InconsistentGeneratorsException- if the result of composition is inconsistent symmetry (antisymmetry with odd parity of permutation)
-
newIndexOfUnderInverse
int newIndexOfUnderInverse(int i)
Returns image of specified point under the action of inverse of this permutation.- Parameters:
i- point- Returns:
- image of specified point under the action of inverse of this permutation
-
antisymmetry
boolean antisymmetry()
Returns true if this permutation is antisymmetry and false otherwise.- Returns:
- true if this permutation is antisymmetry and false otherwise
-
toSymmetry
Permutation toSymmetry()
If this is antisymmetry, then converts this permutation to symmetry.- Returns:
- same permutation with
falseantisymmetry
-
negate
Permutation negate()
Changes sign (symmetry to antisymmetry and vice versa) of this permutation- Returns:
- same permutation with changed sign
-
composition
Permutation composition(Permutation other)
Returns the result ofthis * other. Applying the resulting permutation is equivalent to applyingotherafterthis.- Parameters:
other- other permutation- Returns:
- the result of
this * other - Throws:
InconsistentGeneratorsException- if the result of composition is inconsistent symmetry (antisymmetry with odd parity of permutation)
-
composition
Permutation composition(Permutation a, Permutation b)
Returns the result ofthis * a * b. Applying the resulting permutation is equivalent to applyingbafteraafterthis.- Parameters:
a- other permutationb- other permutation- Returns:
- the result of
this * a * b - Throws:
InconsistentGeneratorsException- if the result of composition is inconsistent symmetry (antisymmetry with odd permutation parity)
-
composition
Permutation composition(Permutation a, Permutation b, Permutation c)
Returns the result ofthis * a * b * c. Applying the resulting permutation is equivalent to applyingcafterbafteraafterthis.- Parameters:
a- other permutationb- other permutationc- other permutation- Returns:
- the result of
this * a * b * c - Throws:
InconsistentGeneratorsException- if the result of composition is inconsistent symmetry (antisymmetry with odd permutation parity)
-
compositionWithInverse
Permutation compositionWithInverse(Permutation other)
Returns the result ofthis * other.inverse(). Applying the resulting permutation is equivalent to applyingother.inverse()afterthis.- Parameters:
other- other permutation- Returns:
- the result of
this * other.inverse() - Throws:
InconsistentGeneratorsException- if the result of composition is inconsistent symmetry (antisymmetry with odd permutation parity)
-
inverse
Permutation inverse()
Returns the inverse permutation of this.- Returns:
- the inverse permutation of this
-
isIdentity
boolean isIdentity()
Returnstrueif this represents identity permutation- Returns:
trueif this is identity permutation
-
getIdentity
Permutation getIdentity()
Returns the identity permutation with the degree of this permutation- Returns:
- identity permutation with the degree of this permutation
-
order
java.math.BigInteger order()
Calculates and returns the order of this permutation.- Returns:
- order of this permutation
- See Also:
Permutations.orderOfPermutation(int[])
-
orderIsOdd
boolean orderIsOdd()
Returns true if order of this permutation is odd and false otherwise.- Returns:
- true if order of this permutation is odd and false otherwise
-
degree
int degree()
Returns a largest moved point plus one.- Returns:
- largest moved point plus one
-
length
int length()
Returns length of the underlying array (at low-level).- Returns:
- length of the underlying array (at low-level)
-
pow
Permutation pow(int exponent)
Returns this raised to the specified exponent.- Parameters:
exponent- exponent- Returns:
- this raised to the specified exponent
-
parity
int parity()
Returns parity of this permutations.- Returns:
- parity of this permutations
-
moveRight
Permutation moveRight(int size)
Inserts identity action on the set [0, 1, ..., size - 1]; as result the degree of resulting permutation will be size + degree of this.- Parameters:
size- size of the set
-
lengthsOfCycles
int[] lengthsOfCycles()
Returns lengths of cycles in disjoint cycle notation.- Returns:
- lengths of cycles in disjoint cycle notation
-
toStringOneLine
java.lang.String toStringOneLine()
Returns a string representation of this permutation in one-line notation.- Returns:
- a string representation of this permutation in one-line notation
-
toStringCycles
java.lang.String toStringCycles()
Returns a string representation of this permutation in disjoint cycles notation.- Returns:
- a string representation of this permutation in disjoint cycles notation
-
-
DataMelt 3.0 © DataMelt by jWork.ORG