repthy
Class HashGroup
Object
AbstractCollection
AbstractSet
ImmutableSet
Group
HashGroup
- All Implemented Interfaces:
- Collection, Set
- Direct Known Subclasses:
- AbelianGroup, GL, PermGp, PGL, PGroup, ProductGroup, PSL, QuotientGroup, SL
- public class HashGroup
- extends Group
An implementation of Group backed by a HashSet
that holds one copy of each element of the group.
- Author:
- Mark McConnell
| Methods inherited from class Group |
cyclicSubgpsUpToConj, describeOrder8, elementarySubgps, fillInCharTable, getCenter, getCentralizer, getCharComparator, getCharTable, getCommutatorSubgroup, getCompositionSeries, getConjClassRep, getEltOrder, getEltOrder, getIdentity, getOrder, getProperNormalSubgroup, getSylow, isAbelian, isCentral, isSimple, isSubgroupOf, order, power, printTest, tableTest |
HashGroup
public HashGroup(Set set)
set is a Set holding GroupElts.
It must be non-empty, and the elements must satisfy the group
axioms. There is no error-checking, but expect trouble if
these conditions are not met. set is copied, so
that changes to it later will not affect what's inside this
group.
HashGroup
public HashGroup(GroupElt[] generators)
- Constructs the group with the given generators. The algorithm
walks naively through the Cayley graph on the generators, hence
has running time depending on the number of edges in the Cayley
graph times its diameter. The group is backed by a
HashSet holding one copy of every element.
- Throws:
IllegalArgumentException - If generators
does not have at least one element.
contains
public boolean contains(Object g)
iterator
public Iterator iterator()
- Returns an iterator over the elements of the group. The
elements appear in an unspecified order.
- Throws:
UnsupportedOperationException - if you call
remove() on this iterator.
size
public int size()
getConjClassNum
public int getConjClassNum()
- Description copied from class:
Group
- Returns the number of conjugacy classes.
- Specified by:
getConjClassNum in class Group
getConjClass
public Set getConjClass(int i)
- Returns the
i-th conjugacy class as an
unmodifiable Set. The inverse operation is getConjClassIndex(repthy.GroupElt). If an element of the class implements
Comparable, then the corresponding Set will be a SortedSet.
- Specified by:
getConjClass in class Group
- Throws:
ArrayIndexOutOfBoundsException - unless 0 ≤
i < getConjClassNum().
getConjClassIndex
public int getConjClassIndex(GroupElt g)
- Returns i such that
g is in the i-th
conjugacy class. The inverse operation is getConjClass(int).
- Specified by:
getConjClassIndex in class Group
- Throws:
NullPointerException - if g is not in the
group.