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.
|
order
public CyclicGroup(int n)
n
- the order of the grouppublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public JSci.maths.groups.CyclicGroup.Member getElement(int i)
i
- the integer representing the elementpublic Group.Member[] getElements()
getElements
in class FiniteGroup
public AbelianGroup.Member zero()
zero
in interface AbelianGroup
public boolean isZero(AbelianGroup.Member g)
isZero
in interface AbelianGroup
g
- a group memberpublic boolean isNegative(AbelianGroup.Member a, AbelianGroup.Member b)
isNegative
in interface AbelianGroup
a
- a group memberb
- a group memberpublic Monoid.Member identity()
public boolean isIdentity(Monoid.Member g)
isIdentity
in interface Monoid
g
- a group memberpublic boolean isInverse(Group.Member a, Group.Member b)