|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.maths.groups.FiniteGroup JSci.maths.groups.CyclicGroup
public final class CyclicGroup
The CyclicGroup class represents the nth cyclic group. Elements are represented by the integers mod n.
Nested Class Summary | |
---|---|
(package private) class |
CyclicGroup.Member
|
Field Summary |
---|
Fields inherited from class JSci.maths.groups.FiniteGroup |
---|
order |
Constructor Summary | |
---|---|
CyclicGroup(int n)
Constructs a cyclic group. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Returns true if this group is isomorphic to another. |
CyclicGroup.Member |
getElement(int i)
Returns an element from the group. |
Group.Member[] |
getElements()
Returns the elements of this group. |
int |
hashCode()
|
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. |
Methods inherited from class JSci.maths.groups.FiniteGroup |
---|
order |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CyclicGroup(int n)
n
- the order of the groupMethod Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public 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()
identity
in interface Monoid
public boolean isIdentity(Monoid.Member g)
isIdentity
in interface Monoid
g
- a group memberpublic boolean isInverse(Group.Member a, Group.Member b)
isInverse
in interface Group
a
- a group memberb
- a group member
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |