|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectPermGpElt
Stores a permutation of the integers 0, 1, ...,
deg-1. The permutation is a one-to-one function from
this set of integers to itself, as expressed by the method apply(int). The toString() method expresses the
permutation in cycle notation; parseCycles(int, java.lang.String) goes in the
other direction.
In this implementation, the object is immutable.
| Constructor Summary | |
PermGpElt(int[] perm)
Constructs the PermGpElt from an array of length
n containing a permutation of the integers 0, 1,
..., n-1. |
|
| Method Summary | |
int |
apply(int i)
Returns this(i). |
int |
bruhatLength()
Returns the number of "consecutive permutations" (0
1), (1 2), up to (n-2 n-1) in
a minimal product equal to this. |
boolean |
commutesWith(GroupElt y)
Returns whether this and the argument commute. |
int |
compareTo(Object o)
|
GroupElt |
conjugate(GroupElt y)
Returns y * this * y^(-1). |
GroupElt |
conjugateYinvXY(GroupElt y)
Returns y^(-1) * this * y. |
boolean |
equals(Object o)
Tests for equality in the mathematical sense--same degree and same permutation. |
int |
getDegree()
|
GroupElt |
getIdentity()
Returns the identity element of the same class as this. |
int |
getOrder(Group G)
This implementation ignores G. |
int |
getSign()
Returns the sign of the permutation as +1 or -1. |
int |
hashCode()
Must be consistent with equals(java.lang.Object). |
GroupElt |
inverse()
Returns the inverse element for this. |
boolean |
isIdentity()
Tests whether this is the identity element among GroupElts of its class. |
static void |
main(String[] args)
For testing. |
GroupElt |
mult(GroupElt y)
Returns this * y, that is, the permutation whose
value on i is this(y(i)). |
static PermGpElt |
parseCycles(int deg,
String x)
Converts a cycle like (2 0 4)(3 1) to a
PermGpElt of the specified degree. |
GroupElt |
power(int i)
Returns the i-th power of this element. |
String |
toString()
Expresses this permutation in disjoint cycle notation. |
| Methods inherited from class Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PermGpElt(int[] perm)
PermGpElt from an array of length
n containing a permutation of the integers 0, 1,
..., n-1. As a function, this permutation maps
i to perm[i].
The array is cloned, so later changes to the argument won't affect what's created here.
IllegalArgumentException - If perm is not
a permutation of the specified form.| Method Detail |
public boolean equals(Object o)
equals in interface GroupEltpublic int hashCode()
GroupEltGroupElt.equals(java.lang.Object).
hashCode in interface GroupEltpublic int compareTo(Object o)
compareTo in interface Comparablepublic final int getDegree()
public final int apply(int i)
this(i). See the comment on the class.
ArrayIndexOutOfBoundsException - if i is
outside the range 0 leq i less than the degree.public GroupElt mult(GroupElt y)
this * y, that is, the permutation whose
value on i is this(y(i)).
mult in interface GroupEltIllegalArgumentException - if the degrees don't
match.public GroupElt inverse()
GroupEltthis.
inverse in interface GroupEltpublic GroupElt conjugate(GroupElt y)
y * this * y^(-1). This obeys the
classical rule: if this = (a b c ...) in cycle
notation, the result is (y(a) y(b) y(c) ...).
conjugate in interface GroupEltIllegalArgumentException - if the degrees don't
match.public GroupElt conjugateYinvXY(GroupElt y)
GroupElty^(-1) * this * y. Compare GroupElt.conjugate(repthy.GroupElt).
conjugateYinvXY in interface GroupEltpublic boolean isIdentity()
GroupEltGroupElts of its class.
isIdentity in interface GroupEltpublic GroupElt getIdentity()
GroupEltthis.
getIdentity in interface GroupEltpublic int getSign()
public boolean commutesWith(GroupElt y)
this and the argument commute.
commutesWith in interface GroupEltIllegalArgumentException - if the degrees don't
match.public int bruhatLength()
(0
1), (1 2), up to (n-2 n-1) in
a minimal product equal to this.
public String toString()
parseCycles(int, java.lang.String) to go in the other direction.
public static PermGpElt parseCycles(int deg,
String x)
(2 0 4)(3 1) to a
PermGpElt of the specified degree. Use toString() to go in the other direction.
IllegalArgumentException - If there is a syntax
error.
NumberFormatException - If some entry is not an
integer.
ArrayIndexOutOfBoundsException - If some entry is
outside the range 0, 1, ...,deg-1.public int getOrder(Group G)
G.
getOrder in interface GroupEltG - A group containing this element. It can be null, but
if it's not, we can use a more efficient algorithm.public GroupElt power(int i)
GroupEltGroup.power(repthy.GroupElt, int), which uses an efficient
squaring algorithm.
power in interface GroupEltpublic static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||