jsci.maths
Class Supernumber
- java.lang.Object
-
- jsci.maths.Supernumber
-
- All Implemented Interfaces:
- java.io.Serializable, Ring.Member, AbelianGroup.Member, Member
public final class Supernumber extends java.lang.Object implements Ring.Member
The Supernumber class encapsulates supernumbers. They are actually implemented as elements of the Grassmann algebra
4
rather than the full 
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Supernumber()Constructs a supernumber.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AbelianGroup.Memberadd(AbelianGroup.Member z)Returns the addition of this number and another.Supernumberadd(Supernumber z)Returns the addition of this supernumber and another.intdimension()Returns the dimension.ComplexgetBody()Returns the body (rank 0) of this supernumber.java.lang.ObjectgetSet()ComplexgetSoul1(int i)Returns the a-number soul (rank 1) of this supernumber.ComplexgetSoul2(int i)Returns the c-number soul (rank 2) of this supernumber.ComplexgetSoul3(int i)Returns the a-number soul (rank 3) of this supernumber.ComplexgetSoul4()Returns the c-number soul (rank 4) of this supernumber.Ring.Membermultiply(Ring.Member z)Returns the multiplication of this number and another.Supernumbermultiply(Supernumber z)Returns the multiplication of this supernumber and another.AbelianGroup.Membernegate()Returns the negative of this number.voidsetBody(Complex b)Sets the body (rank 0) of this supernumber.voidsetSoul1(int i, Complex s)Sets the a-number soul (rank 1) of this supernumber.voidsetSoul2(int i, Complex s)Sets the c-number soul (rank 2) of this supernumber.voidsetSoul3(int i, Complex s)Sets the a-number soul (rank 3) of this supernumber.voidsetSoul4(Complex s)Sets the c-number soul (rank 4) of this supernumber.AbelianGroup.Membersubtract(AbelianGroup.Member z)Returns the subtraction of this number and another.Supernumbersubtract(Supernumber z)Returns the subtraction of this supernumber and another.java.lang.StringtoString()Returns a string representing the value of this supernumber.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns a string representing the value of this supernumber.- Overrides:
toStringin classjava.lang.Object
-
getBody
public Complex getBody()
Returns the body (rank 0) of this supernumber.
-
setBody
public void setBody(Complex b)
Sets the body (rank 0) of this supernumber.
-
getSoul1
public Complex getSoul1(int i)
Returns the a-number soul (rank 1) of this supernumber.
-
setSoul1
public void setSoul1(int i, Complex s)Sets the a-number soul (rank 1) of this supernumber.
-
getSoul2
public Complex getSoul2(int i)
Returns the c-number soul (rank 2) of this supernumber.
-
setSoul2
public void setSoul2(int i, Complex s)Sets the c-number soul (rank 2) of this supernumber.
-
getSoul3
public Complex getSoul3(int i)
Returns the a-number soul (rank 3) of this supernumber.
-
setSoul3
public void setSoul3(int i, Complex s)Sets the a-number soul (rank 3) of this supernumber.
-
getSoul4
public Complex getSoul4()
Returns the c-number soul (rank 4) of this supernumber.
-
setSoul4
public void setSoul4(Complex s)
Sets the c-number soul (rank 4) of this supernumber.
-
dimension
public int dimension()
Returns the dimension.
-
negate
public AbelianGroup.Member negate()
Returns the negative of this number.- Specified by:
negatein interfaceAbelianGroup.Member
-
add
public AbelianGroup.Member add(AbelianGroup.Member z)
Returns the addition of this number and another.- Specified by:
addin interfaceAbelianGroup.Member- Parameters:
z- a group member
-
add
public Supernumber add(Supernumber 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:
subtractin interfaceAbelianGroup.Member- Parameters:
z- a group member
-
subtract
public Supernumber subtract(Supernumber 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:
multiplyin interfaceRing.Member- Parameters:
z- a ring member
-
multiply
public Supernumber multiply(Supernumber z)
Returns the multiplication of this supernumber and another.- Parameters:
z- a supernumber
-
-
DMelt 3.0 © DataMelt by jWork.ORG