org.jscience.mathematics.algebraic.numbers
Class ExactSupernumber

java.lang.Object
  extended by java.lang.Number
      extended by org.jscience.mathematics.algebraic.numbers.ExactSupernumber
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Ring.Member, AbelianGroup.Member, Member

public final class ExactSupernumber
extends java.lang.Number
implements java.lang.Cloneable, java.io.Serializable, Ring.Member

The ExactSupernumber class encapsulates supernumbers. They are actually implemented as elements of the Grassmann algebra Lambda4 rather than the full Lambdainfinity.

See Also:
Serialized Form

Field Summary
static java.lang.Class TYPE
           
 
Constructor Summary
ExactSupernumber()
          Constructs a supernumber.
ExactSupernumber(ExactComplex body, ExactComplex[] soul1, ExactComplex[] soul2, ExactComplex[] soul3, ExactComplex soul4)
          Constructs a supernumber.
ExactSupernumber(ExactSupernumber s)
          Constructs a supernumber.
ExactSupernumber(Supernumber s)
          Constructs a supernumber.
 
Method Summary
 AbelianGroup.Member add(AbelianGroup.Member z)
          Returns the addition of this number and another.
 ExactSupernumber add(ExactSupernumber z)
          Returns the addition of this supernumber and another.
 java.lang.Object clone()
           
 int dimension()
          Returns the dimension.
 double doubleValue()
           
 float floatValue()
           
 ExactComplex getBody()
          Returns the body (rank 0) of this supernumber.
 ExactComplex getSoul1(int i)
          Returns the a-number soul (rank 1) of this supernumber.
 ExactComplex getSoul2(int i)
          Returns the c-number soul (rank 2) of this supernumber.
 ExactComplex getSoul3(int i)
          Returns the a-number soul (rank 3) of this supernumber.
 ExactComplex getSoul4()
          Returns the c-number soul (rank 4) of this supernumber.
 int intValue()
           
 long longValue()
           
 ExactSupernumber multiply(ExactSupernumber z)
          Returns the multiplication of this supernumber and another.
 Ring.Member multiply(Ring.Member z)
          Returns the multiplication of this number and another.
 AbelianGroup.Member negate()
          Returns the negative of this number.
 void setBody(ExactComplex b)
          Sets the body (rank 0) of this supernumber.
 void setSoul1(int i, ExactComplex s)
          Sets the a-number soul (rank 1) of this supernumber. i should be from 0 to 3.
 void setSoul2(int i, ExactComplex s)
          Sets the c-number soul (rank 2) of this supernumber. i should be from 0 to 5.
 void setSoul3(int i, ExactComplex s)
          Sets the a-number soul (rank 3) of this supernumber. i should be from 0 to 3.
 void setSoul4(ExactComplex s)
          Sets the c-number soul (rank 4) of this supernumber.
 AbelianGroup.Member subtract(AbelianGroup.Member z)
          Returns the subtraction of this number and another.
 ExactSupernumber subtract(ExactSupernumber z)
          Returns the subtraction of this supernumber and another.
 java.lang.String toString()
          Returns a string representing the value of this supernumber.
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final java.lang.Class TYPE
Constructor Detail

ExactSupernumber

public ExactSupernumber()
Constructs a supernumber.


ExactSupernumber

public ExactSupernumber(ExactSupernumber s)
Constructs a supernumber. We don't perform any check though we should.


ExactSupernumber

public ExactSupernumber(Supernumber s)
Constructs a supernumber. We don't perform any check though we should.


ExactSupernumber

public ExactSupernumber(ExactComplex body,
                        ExactComplex[] soul1,
                        ExactComplex[] soul2,
                        ExactComplex[] soul3,
                        ExactComplex soul4)
Constructs a supernumber. We don't perform any check though we should.

Method Detail

toString

public java.lang.String toString()
Returns a string representing the value of this supernumber.

Overrides:
toString in class java.lang.Object

getBody

public ExactComplex getBody()
Returns the body (rank 0) of this supernumber.


setBody

public void setBody(ExactComplex b)
Sets the body (rank 0) of this supernumber.


getSoul1

public ExactComplex getSoul1(int i)
Returns the a-number soul (rank 1) of this supernumber.


setSoul1

public void setSoul1(int i,
                     ExactComplex s)
Sets the a-number soul (rank 1) of this supernumber. i should be from 0 to 3.


getSoul2

public ExactComplex getSoul2(int i)
Returns the c-number soul (rank 2) of this supernumber.


setSoul2

public void setSoul2(int i,
                     ExactComplex s)
Sets the c-number soul (rank 2) of this supernumber. i should be from 0 to 5.


getSoul3

public ExactComplex getSoul3(int i)
Returns the a-number soul (rank 3) of this supernumber.


setSoul3

public void setSoul3(int i,
                     ExactComplex s)
Sets the a-number soul (rank 3) of this supernumber. i should be from 0 to 3.


getSoul4

public ExactComplex getSoul4()
Returns the c-number soul (rank 4) of this supernumber.


setSoul4

public void setSoul4(ExactComplex s)
Sets the c-number soul (rank 4) of this supernumber.


dimension

public int dimension()
Returns the dimension.


intValue

public int intValue()
Specified by:
intValue in class java.lang.Number

longValue

public long longValue()
Specified by:
longValue in class java.lang.Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class java.lang.Number

floatValue

public float floatValue()
Specified by:
floatValue in class java.lang.Number

negate

public AbelianGroup.Member negate()
Returns the negative of this number.

Specified by:
negate in interface AbelianGroup.Member
Returns:
DOCUMENT ME!

add

public AbelianGroup.Member add(AbelianGroup.Member z)
Returns the addition of this number and another.

Specified by:
add in interface AbelianGroup.Member
Parameters:
z - a group member
Returns:
DOCUMENT ME!

add

public ExactSupernumber add(ExactSupernumber z)
Returns the addition of this supernumber and another.

Parameters:
z - a supernumber

subtract

public AbelianGroup.Member subtract(AbelianGroup.Member z)
Returns the subtraction of this number and another.

Specified by:
subtract in interface AbelianGroup.Member
Parameters:
z - a group member
Returns:
DOCUMENT ME!

subtract

public ExactSupernumber subtract(ExactSupernumber z)
Returns the subtraction of this supernumber and another.

Parameters:
z - a supernumber

multiply

public Ring.Member multiply(Ring.Member z)
Returns the multiplication of this number and another.

Specified by:
multiply in interface Ring.Member
Parameters:
z - a ring member
Returns:
DOCUMENT ME!

multiply

public ExactSupernumber multiply(ExactSupernumber z)
Returns the multiplication of this supernumber and another.

Parameters:
z - a supernumber

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object