public final class CyclicGroup extends FiniteGroup implements AbelianGroup
order| Constructor and Description |
|---|
CyclicGroup(int n)
Constructs a cyclic group.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Returns true if this group is isomorphic to another.
|
JSci.maths.groups.CyclicGroup.Member |
getElement(int i)
Returns an element from the group.
|
Group.Member[] |
getElements()
Returns the elements of this group.
|
Monoid.Member |
identity()
Returns the identity element.
|
boolean |
isIdentity(Monoid.Member g)
Returns true if the member is the identity element of this group.
|
boolean |
isInverse(Group.Member a,
Group.Member b)
Returns true if one member is the inverse of the other.
|
boolean |
isNegative(AbelianGroup.Member a,
AbelianGroup.Member b)
Returns true if one member is the negative (inverse) of the other.
|
boolean |
isZero(AbelianGroup.Member g)
Returns true if the member is the identity element of this group.
|
java.lang.String |
toString() |
AbelianGroup.Member |
zero()
Returns the identity element.
|
orderpublic CyclicGroup(int n)
n - the order of the grouppublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic JSci.maths.groups.CyclicGroup.Member getElement(int i)
i - the integer representing the elementpublic Group.Member[] getElements()
getElements in class FiniteGrouppublic AbelianGroup.Member zero()
zero in interface AbelianGrouppublic boolean isZero(AbelianGroup.Member g)
isZero in interface AbelianGroupg - a group memberpublic boolean isNegative(AbelianGroup.Member a, AbelianGroup.Member b)
isNegative in interface AbelianGroupa - a group memberb - a group memberpublic Monoid.Member identity()
public boolean isIdentity(Monoid.Member g)
isIdentity in interface Monoidg - a group memberpublic boolean isInverse(Group.Member a, Group.Member b)