public class Sn.SnElementImpl extends java.lang.Object implements GroupElementImpl, java.util.function.Function<java.lang.Integer,java.lang.Integer>
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
images
Contains the images of this permutation in order.
|
| Constructor and Description |
|---|
SnElementImpl(java.util.function.Function<java.lang.Integer,java.lang.Integer> permutation)
Create from a mapping.
|
SnElementImpl(int[] images)
Create from a list of images, which contains the images of this permutation in order.
|
SnElementImpl(Representation repr)
Recreate from representation.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
apply(java.lang.Integer i) |
boolean |
checkValidElement()
Checks that this claimed permutation is indeed bijective.
|
boolean |
equals(java.lang.Object obj) |
Representation |
getRepresentation()
The representation of this object.
|
GroupImpl |
getStructure()
Retrieves the group this element belongs to.
|
int |
hashCode() |
Sn.SnElementImpl |
inv()
Calculates the inverse of this group element.
|
Sn.SnElementImpl |
op(GroupElementImpl e)
Calculates the result of this op e.
|
java.lang.String |
toString() |
ByteAccumulator |
updateAccumulator(ByteAccumulator accumulator)
Updates the ByteAccumulator with the unique byte representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisNeutralElement, pow, squaregetUniqueByteRepresentationprotected int[] images
images[i] = j is equivalent to i being mapped to j.
Note that images[0] is unused as we map \(\{1,...,n\}\).public SnElementImpl(Representation repr)
public SnElementImpl(java.util.function.Function<java.lang.Integer,java.lang.Integer> permutation)
public SnElementImpl(int[] images)
images[i] = j is equivalent to i being mapped to j.
Note that images[0] is unused as we map \(\{1,...,n\}\).public boolean checkValidElement()
public Representation getRepresentation()
RepresentableReprUtilgetRepresentation in interface RepresentableRepresentationpublic GroupImpl getStructure()
GroupElementImplgetStructure in interface GroupElementImplpublic Sn.SnElementImpl inv()
GroupElementImplinv in interface GroupElementImplx.op(this).equals(getStructure().getNeutralElement())public Sn.SnElementImpl op(GroupElementImpl e) throws java.lang.IllegalArgumentException
GroupElementImplop in interface GroupElementImple - right hand side of the operationjava.lang.IllegalArgumentException - if e is of the wrong typepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Integer apply(java.lang.Integer i)
apply in interface java.util.function.Function<java.lang.Integer,java.lang.Integer>public ByteAccumulator updateAccumulator(ByteAccumulator accumulator)
UniqueByteRepresentableThe input to the accumulators update function is an injective (with respect to a given domain) byte encoding of this object.
For many use-cases, the AnnotatedUbrUtil can be used to quickly implement this method.
updateAccumulator in interface UniqueByteRepresentable