JSci.maths.groups
Class QuaternionGroup

java.lang.Object
  extended by JSci.maths.groups.FiniteGroup
      extended by JSci.maths.groups.QuaternionGroup
All Implemented Interfaces:
Group, Monoid

public final class QuaternionGroup
extends FiniteGroup

The QuaternionGroup class represents the quaternion group.

PlanetMath references:
QuaternionGroup

Nested Class Summary
(package private)  class QuaternionGroup.Member
           
 
Field Summary
 
Fields inherited from class JSci.maths.groups.FiniteGroup
order
 
Method Summary
 Group.Member[] getElements()
          Returns the elements of this group.
static QuaternionGroup getInstance()
          Constructs the quaternion group.
 Monoid.Member identity()
          Returns the identity element.
 boolean isIdentity(Monoid.Member a)
          Returns true if the element is the identity element of this group.
 boolean isInverse(Group.Member a, Group.Member b)
          Returns true if one element is the inverse of the other.
 java.lang.String toString()
           
 
Methods inherited from class JSci.maths.groups.FiniteGroup
order
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static final QuaternionGroup getInstance()
Constructs the quaternion group. Singleton.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getElements

public Group.Member[] getElements()
Returns the elements of this group.

Specified by:
getElements in class FiniteGroup

identity

public Monoid.Member identity()
Returns the identity element.


isIdentity

public boolean isIdentity(Monoid.Member a)
Returns true if the element is the identity element of this group.

Parameters:
a - a group element

isInverse

public boolean isInverse(Group.Member a,
                         Group.Member b)
Returns true if one element is the inverse of the other.

Parameters:
a - a group element
b - a group element