repthy
Interface GroupElt

All Known Implementing Classes:
MatrixModp, PermGpElt, ProductGroupElt, QuotientGroupElt

public interface GroupElt

A GroupElt is an Object supporting the group operations mult(repthy.GroupElt) and inverse(), with an appropriate notion of equals(java.lang.Object). Different applications will implement the abstract methods differently (via composition of functions, matrix multiplication, etc.) The class provides other commonly-used methods, such as conjugate(repthy.GroupElt) and commutesWith(repthy.GroupElt).

If A implements GroupElt, its methods will probably cast their GroupElt arguments to class A. Hence the arguments must be of the appropriate class. Expect ClassCastExceptions if this rule is violated.

If an implementing class also implements Comparable, the standard conjugacy-class methods in HashGroup will sort each conjugacy class. However, the implementation MUST be consistent with equals, as described in the documentation on Comparable.

GroupElts should be immutable.

Author:
Mark McConnell

Method Summary
 boolean commutesWith(GroupElt y)
          Whether this and y commute.
 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, not by ==.
 GroupElt getIdentity()
          Returns the identity element of the same class as this.
 int getOrder(Group G)
          Returns the order of this element.
 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.
 GroupElt mult(GroupElt y)
          Returns the product this * y.
 GroupElt power(int i)
          Returns the i-th power of this element.
 

Method Detail

mult

public GroupElt mult(GroupElt y)
Returns the product this * y. The operation must be associative.


inverse

public GroupElt inverse()
Returns the inverse element for this.


equals

public boolean equals(Object o)
Tests for equality in the mathematical sense, not by ==.


hashCode

public int hashCode()
Must be consistent with equals(java.lang.Object).


isIdentity

public boolean isIdentity()
Tests whether this is the identity element among GroupElts of its class.


getIdentity

public GroupElt getIdentity()
Returns the identity element of the same class as this.


conjugate

public GroupElt conjugate(GroupElt y)
Returns y * this * y^(-1). Compare conjugateYinvXY(repthy.GroupElt).


conjugateYinvXY

public GroupElt conjugateYinvXY(GroupElt y)
Returns y^(-1) * this * y. Compare conjugate(repthy.GroupElt).


commutesWith

public boolean commutesWith(GroupElt y)
Whether this and y commute.


getOrder

public int getOrder(Group G)
Returns the order of this element. Implementations may be based on Group.getEltOrder(GroupElt, Group). However, if code needs to compute the order for many elements of a fixed group, Group.getEltOrder(GroupElt, int, int[][]) may be more efficient.

Parameters:
G - A group containing this element. It can be null, but if it's not, we can use a more efficient algorithm.

power

public GroupElt power(int i)
Returns the i-th power of this element. Implementations may be based on Group.power(repthy.GroupElt, int), which uses an efficient squaring algorithm.