jhypercomplex.numbers
Class Hypernumber

java.lang.Object
  extended by jhypercomplex.numbers.Hypernumber
All Implemented Interfaces:
CommonMethods
Direct Known Subclasses:
Associator, CayleyDicksonAlgebra, CliffordAlgebra, Vector

public abstract class Hypernumber
extends java.lang.Object
implements CommonMethods

Version:
0.1
Author:
Markus Maute (http://www.JHyperComplex.com)

Field Summary
 int ARG_NUM
           
static int CIRCULAR
           
 int COMP_NUM
           
 java.lang.String[] components
           
static int HYPERBOLIC
           
static double ZERO_PRECISSION
           
 
Constructor Summary
Hypernumber()
           
 
Method Summary
 Hypernumber add(Hypernumber h)
           
 Hypernumber add(Hypernumber h, boolean collect_terms)
          Add a bypercomplex number.
 Hypernumber applyLeibnizRule(Hypernumber h)
          TODO: meanwhile see 'getLeftCovariantDerivative ()'
 java.lang.String asString()
           
 java.lang.String asString(boolean with_blanks)
           
 Hypernumber calculateBCHWith(Hypernumber h, int from_order, int to_order)
          The Baker Campbell Hausdorff formula (BCH) is calculated for a specified range of orders.
 void collectTerms()
          Equal terms of the components are added or subtracted wherever possible.
 void compressComponents()
          Removes all blanks from components as they are algebraically redundant.
 Hypernumber conjugate()
           
static Hypernumber dual()
          // TODO Implementation not clear, as we have to distinguish between a left- and // a right dual ...
static Hypernumber getAlternator1(Hypernumber h1, Hypernumber h2, Hypernumber h3, Hypernumber h4)
           
static Hypernumber getAlternator2(Hypernumber h1, Hypernumber h2, Hypernumber h3, Hypernumber h4)
           
static Hypernumber getAntiAssociator(Hypernumber h1, Hypernumber h2, Hypernumber h3)
           
static Hypernumber getAntiCommutator(Hypernumber h1, Hypernumber h2)
           
 Hypernumber getAntiCommutatorWith(Hypernumber h)
          Calculates the anti-commutator of the hypernumber h1 with another one h2 which is defined as: {h1, h2} = h1*h2 + h2*h1
static Hypernumber getAssociationType(int nr, Hypernumber a, Hypernumber b, Hypernumber c, Hypernumber d)
          There are 5 ways to put the brackets in a product of 4 hypernumbers.
static Hypernumber getAssociationType(int nr, Hypernumber a, Hypernumber b, Hypernumber c, Hypernumber d, Hypernumber e)
          There are 14 ways to put the brackets in a product of 5 hypernumbers.
static java.lang.String getAssociationTypeAsString(int nr, java.lang.String a, java.lang.String b, java.lang.String c, java.lang.String d)
           
static java.lang.String getAssociationTypeAsString(int nr, java.lang.String a, java.lang.String b, java.lang.String c, java.lang.String d, java.lang.String e)
           
static Hypernumber getAssociationTypeCommutator(int nr, Hypernumber a, Hypernumber b, Hypernumber c, Hypernumber d)
          There are 5 ways to nest 3 commutators of 4 hypernumbers, namely nr 1 [[[a,b],c],d] 2 [a,[b,[c,d]]] 3 [[a,[b,c]],d] 4 [a,[[b,c],d]] 5 [[a,b],[c,d]]
static Hypernumber getAssociationTypeCommutator(int nr, Hypernumber a, Hypernumber b, Hypernumber c, Hypernumber d, Hypernumber e)
          There are 14 ways to nest 4 commutators of 5 hypernumbers, namely nr 1 [a,[b,[c,[d,e]]]] 2 [a,[b,[[c,d],e]]] 3 [a,[[b,c],[d,e]]] 4 [a,[[b,[c,d]],e]] 5 [a,[[[b,c],d],e]] 6 [[a,b][c,[d,e]]] 7 [[a,b][[c,d],e]] 8 [[a,[b,c]],[d,e]] 9 [[a,[b,[c,d]]],e] 10 [[a,[[b,c],d]],e] 11 [[[a,b],c],[d,e]] 12 [[[a,b],[c,d]],e] 13 [[[a,[b,c]],d],e] 14 [[[[a,b],c],d],e]
static java.lang.String getAssociationTypeCommutatorAsString(int nr, java.lang.String a, java.lang.String b, java.lang.String c, java.lang.String d)
           
static java.lang.String getAssociationTypeCommutatorAsString(int nr, java.lang.String a, java.lang.String b, java.lang.String c, java.lang.String d, java.lang.String e)
           
static Hypernumber getAssociator(Hypernumber h1, Hypernumber h2, Hypernumber h3)
           
abstract  java.lang.String[] getBasis()
           
 java.lang.String getBasisElementsAsString()
           
static Hypernumber getCommuAssociator(Hypernumber h1, Hypernumber h2, Hypernumber h3, Hypernumber h4)
           
static Hypernumber getCommutator(Hypernumber h1, Hypernumber h2)
           
static Hypernumber getCommutator(Hypernumber h1, Hypernumber h2, boolean collect_terms)
           
static Hypernumber getCommutatorJacobian(Hypernumber h1, Hypernumber h2, Hypernumber h3)
           
static Hypernumber getCommutatorSaglian(Hypernumber h1, Hypernumber h2, Hypernumber h3, Hypernumber h4)
           
 Hypernumber getCommutatorWith(Hypernumber h)
          Analysis *
 Hypernumber getCommutatorWith(Hypernumber h, boolean collect_terms)
          Calculates the commutator of the the hypernumber h1 with another one h2 which is defined as: [h1, h2] = h1*h2 - h2*h1
 java.lang.String getComponent(int comp_nr)
           
 java.lang.String[] getComponents()
           
 java.lang.String getComponentsAsString()
           
 java.lang.String getComponentsAsString(boolean with_blanks)
           
 java.lang.String[] getComponentsOfGrade(int grade, java.util.TreeMap<java.lang.Integer,java.lang.Integer> grades)
           
static Hypernumber getConjugate(Hypernumber h)
           
 java.lang.String getDiagonalProducts()
           
static Hypernumber getDifference(Hypernumber h1, Hypernumber h2)
           
static Hypernumber getDual(Hypernumber h)
           
 java.util.LinkedList<java.lang.String> getExpressionAsList(java.lang.String expression)
          An expression is split up in respect to the summands.
static Hypernumber getFirstHetztelPeresian(Hypernumber a, Hypernumber b, Hypernumber c, Hypernumber d, Hypernumber e)
           
 java.lang.String getFormattedMultTable()
           
static Hypernumber getGradedInnerProduct(Hypernumber h1, Hypernumber h2, boolean with_grade_0)
           
 Hypernumber getHermitianConjugate()
          The hermitian conjugate of a hypernumber H is defined as: *H = *(S,S) = (*S,S) where S is the subalgebra from which the hypernumber is constructed via a (Cayley-Dickson) doubling procedure.
static Hypernumber getImaginaryPart(Hypernumber h)
           
static Hypernumber getInstance(java.lang.Class class_)
           
static java.util.HashSet<Hypernumber> getIntersection(Hypernumber[] h1, Hypernumber[] h2)
          Two sets of hypernumbers are compared.
static Hypernumber getJacobian(Hypernumber h1, Hypernumber h2, Hypernumber h3)
           
static Hypernumber getJordanAssociator(Hypernumber h1, Hypernumber h2, Hypernumber h3)
           
 Hypernumber getLeftCovariantDerivative(Hypernumber covariant_deriv_op, Hypernumber h)
          The covariant derivative of the hypernumber is calculated.
 int getMultiplicativeOrder(Hypernumber h, int max_steps)
           
 int getMultiplicativeOrder(Hypernumber h, int mult_steps, double zero_precision)
          Multiplicative order n, defined by: {min n: h1*(h2^n) = l*h1} with l a scalar factor.
 java.lang.String getMultTableDiagonal()
           
static Hypernumber getNegated(Hypernumber h)
           
static java.lang.String getNextBitmap(java.lang.String bitmap)
          Used for permuting a bitmap with n 1's.
static java.lang.String[][] getNormedMultiplicationTable(java.lang.String[][] mult_table, java.lang.String[] basis, java.lang.String[] sub_basis)
          A normed multiplication table is per definition a table where the base elements are numbered according to the order of their occurence in the basis vector (integers running from 1 upwards).
static Hypernumber getNormSquared(Hypernumber h)
           
 double getNormSquaredAsValue()
          REQUIRES: Invocation in numerical mode.
static int getNumberOfClosedElements(Hypernumber[] h)
          In case that the full set of elements is not closed under multiplication, it might be of interest for how many of its elements this property is still given.
static int getNumberOfClosedPairs(Hypernumber[] h)
          For every posssible pair of the given set of hypernumbers it is checked if the prodeuct is again contained in the set.
 int getNumberOfComponents(int grade, java.util.TreeMap<java.lang.Integer,java.lang.Integer> grades)
           
 int getNumberOfNonzeroComponents()
           
static Hypernumber getNumericalInverse(Hypernumber h)
          The inverse of a hypernumber h is calculated.
static Hypernumber getOuterProduct(Hypernumber h1, Hypernumber h2)
           
static Hypernumber getProduct(Hypernumber h1, Hypernumber h2)
          Multiplies two hypernummers according to the order of the arguments of the method.
static Hypernumber getProductWithScalar(Hypernumber h, java.lang.String scalar)
           
 java.lang.String getPseudoScalarComponent()
           
static Hypernumber[] getRandomClosedPair(Hypernumber[] h)
          From the given set of hypernumbers a random pair is chosen (non trivial, i.a. the two elements are supposed to be different).
static Hypernumber[] getRandomNonClosedPair(Hypernumber[] h)
          From the given set of hypernumbers a random pair is chosen (non trivial, i.a. the two elements are supposed to be different).
 java.lang.String getScalarComponent()
           
static Hypernumber getScalarProduct(Hypernumber h1, Hypernumber h2)
          The scalar product <.|.> of two hypernumbers h1 and h2 is defined as = 1/2(h1h2*+h2h1*)
static Hypernumber getSecondHetztelPeresian(Hypernumber h1, Hypernumber h2, Hypernumber h3, Hypernumber h4)
           
 java.lang.String getSignature()
           
static java.util.HashSet<java.lang.String> getSubalgebras(java.lang.Class class_, int order)
          Determines all subalgebras of order n.
static java.lang.String getSubalgebrasAsString(java.lang.Class<?> class_, int order)
           
 java.util.Collection<java.lang.String> getSubalgebrasSignatures(java.lang.Class<?> class_, int order)
           
static Hypernumber getSum(Hypernumber h1, Hypernumber h2)
           
static Hypernumber getTrace(Hypernumber h)
          The trace of a hypernumber is defined as tr(h) = h + conjugate(h) = 2*real part (h).
 double getTraceRespDeterminant(Hypernumber h)
           
static Hypernumber getVectorDerivative(Hypernumber direction, Hypernumber function)
          Derivative in direction of a vector 'a' for a hypernumber-valued function F: (a*d)F with '*' being the inner product and 'd' a
static Hypernumber getVectorProduct(Hypernumber h1, Hypernumber h2)
          The vector product "x" of two hypernumbers h1 and h2 is defined as h1 x h2 = Im(Im(h1)*Im(h2)) = 0.5 [h1,h2] It coincides with the conventional vector product in 3 dimensions for the quaternions and the vector product in 7-dimensions for the octonions.
 boolean isAutomorphism(Hypernumber x, Hypernumber y)
          Checks if given hypernumber is related to the hypernumbers x,y via the automorphism map: a^{-1}xy a = l (a^{-1}x a) (a^{-1}y a) with l a constant, i.e. we do not require an appropriate normalisation of the hypernumbers.
static boolean isClosedAlgebra(Hypernumber[] h)
          REQUIRES: Mode must be set to numerical.
static boolean isCommutative(Hypernumber h1, Hypernumber h2)
           
 boolean isComponentZero(int nr)
           
 boolean isEqual(Hypernumber h)
          Compares the components of the hypernumber with those of another one.
static boolean isLinearlyDependent(Hypernumber h1, Hypernumber h2, boolean pos_and_neg)
          Tests linear dependency, i.e. if h1 = c*h2 is satisfied, with "c" a (real) non-zero constant.
 boolean isNumerical()
           
static boolean isNumericalityDetected(Hypernumber h)
          Detects if all the components are numerical.
static boolean isOrthogonal(Hypernumber h1, Hypernumber h2)
           
 boolean isOrthogonalTo(Hypernumber h)
           
 boolean isZero()
           
 Hypernumber multiplyWithScalar(java.lang.String scalar)
          Multiplication with a scalar.
 Hypernumber negate()
          Negates the hypernumber: h --> -h.
 void resetComponents()
          Sets all components to zero.
 Hypernumber rightMultiplyWith(Hypernumber h2)
           
 Hypernumber rightMultiplyWith(Hypernumber h, boolean collect_terms)
          Multiply with another hypercomplex number.
 void setBasis(java.lang.String[] new_basis)
          Sets the components of the hypercomplex number.
 void setComponent(int n, java.lang.String value)
          Sets the value of a single component.
 void setComponents(java.lang.String components)
          Sets the components of the hypercomplex number.
 void setComponents(java.lang.String[] comps)
           
static void setNumerical()
           
static void setNumerical(boolean is_numerical)
           
 void setPseudoScalarComponent(java.lang.String scalar)
           
 void setRandomComponents(int n)
           
 void setRandomComponents(int n, boolean is_imaginary)
           
 void setRandomComponents(int n, boolean is_imaginary, boolean numerical)
          Assigns random components to the hypernumber.
 void setRandomComponentsAll()
          Sets all components randomly.
 void setScalarComponent(java.lang.String scalar)
           
 void simplifyNumericalFactors()
          For the components the factors of all terms separated by "+" or "-" are moved to the front and are multiplied with one another.
 void simplifyNumericalSummands()
          Numerical summands are simplified, i.e. added or subtracted.
 void simplifyPlusMinus()
          Simplifies the components, replacing any adjacent "+"'s and "-"'s according to: "++" --> "+" "+-" --> "-" "-+" --> "-" "--" --> "+"
 Hypernumber square()
           
 Hypernumber subtract(Hypernumber h)
          Subtracts a hypernumber.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jhypercomplex.numbers.CommonMethods
getClone, getGrade, getNewInstance, getNumberOfComponents, getNumberOfGrades, isCayleyDicksonAlgebra
 

Field Detail

CIRCULAR

public static final int CIRCULAR
See Also:
Constant Field Values

HYPERBOLIC

public static final int HYPERBOLIC
See Also:
Constant Field Values

ZERO_PRECISSION

public static double ZERO_PRECISSION

COMP_NUM

public int COMP_NUM

ARG_NUM

public int ARG_NUM

components

public java.lang.String[] components
Constructor Detail

Hypernumber

public Hypernumber()
Method Detail

getInstance

public static Hypernumber getInstance(java.lang.Class class_)
                               throws java.lang.InstantiationException,
                                      java.lang.IllegalAccessException
Parameters:
classname - Class name.
Returns:
An instance of the hypernumber with the given class name.
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException

getBasis

public abstract java.lang.String[] getBasis()

setBasis

public void setBasis(java.lang.String[] new_basis)
              throws java.lang.Exception
Sets the components of the hypercomplex number. They are in respect to the base defined by the multiplication table. TODO specify the allowed form of a component

Parameters:
components - E.g. the 8 components of an octonion, "x1,x2,x3,x4,x5,x6,x7,x8".
Throws:
java.lang.Exception - Thrown if the argument is not valid.

getBasisElementsAsString

public java.lang.String getBasisElementsAsString()
Returns:
String with basis elements comma delimited. E.g. "(e1,e2)"

getFormattedMultTable

public java.lang.String getFormattedMultTable()
Returns:
A very rudimentary implementation (yet) for for text-formatting the multiplication table.

isEqual

public boolean isEqual(Hypernumber h)
                throws java.lang.Exception
Compares the components of the hypernumber with those of another one. Different ordering of summands and products is taken into account, i.e. x3+x1*x2 = x2*x1+x3

Returns:
'true' iff all components are the same.
Throws:
java.lang.Exception

setComponents

public void setComponents(java.lang.String components)
                   throws java.lang.Exception
Sets the components of the hypercomplex number. They are in respect to the base defined by the multiplication table. TODO specify the allowed form of a component

Parameters:
components - E.g. the 8 components of an octonion, "x1,x2,x3,x4,x5,x6,x7,x8".
Throws:
java.lang.Exception - Thrown if the argument is not valid.

setNumerical

public static void setNumerical()

setNumerical

public static void setNumerical(boolean is_numerical)
Parameters:
is_numerical - 'true': Mathematical operations are carried out numerically. 'false': -- " -- algebraically.

isNumerical

public boolean isNumerical()

isComponentZero

public boolean isComponentZero(int nr)
                        throws java.lang.Exception
Parameters:
nr - Number of component (counting starting with "1").
Returns:
'true' if component is zero, 'false' else.
Throws:
java.lang.Exception

setComponents

public void setComponents(java.lang.String[] comps)
                   throws java.lang.Exception
Throws:
java.lang.Exception

setScalarComponent

public void setScalarComponent(java.lang.String scalar)

getScalarComponent

public java.lang.String getScalarComponent()

setPseudoScalarComponent

public void setPseudoScalarComponent(java.lang.String scalar)

getPseudoScalarComponent

public java.lang.String getPseudoScalarComponent()

resetComponents

public void resetComponents()
Sets all components to zero.


setComponent

public void setComponent(int n,
                         java.lang.String value)
                  throws java.lang.Exception
Sets the value of a single component.

Parameters:
n - Component number (counting starts with "0").
value - Value.
Throws:
java.lang.Exception

getComponents

public java.lang.String[] getComponents()

getComponent

public java.lang.String getComponent(int comp_nr)
Parameters:
comp_nr -
Returns:
N-th component, numbering starting with '0'.

getComponentsAsString

public java.lang.String getComponentsAsString()

isNumericalityDetected

public static boolean isNumericalityDetected(Hypernumber h)
Detects if all the components are numerical.

Returns:
'true' if so. 'false' else.

getComponentsAsString

public java.lang.String getComponentsAsString(boolean with_blanks)

setRandomComponentsAll

public void setRandomComponentsAll()
                            throws java.lang.Exception
Sets all components randomly.

Throws:
java.lang.Exception

setRandomComponents

public void setRandomComponents(int n)
                         throws java.lang.Exception
Throws:
java.lang.Exception

setRandomComponents

public void setRandomComponents(int n,
                                boolean is_imaginary)
                         throws java.lang.Exception
Throws:
java.lang.Exception

setRandomComponents

public void setRandomComponents(int n,
                                boolean is_imaginary,
                                boolean numerical)
                         throws java.lang.Exception
Assigns random components to the hypernumber.

Parameters:
n - Number of components to be set. The others are set to zero.
is_imaginary - Only imaginary components are set, i.e. the first component is ignored.
numerical - the components are numerical (doubles). If the hypernumber is set to numerical anyhow, this flag is ignored.
Throws:
java.lang.Exception

asString

public java.lang.String asString(boolean with_blanks)
Parameters:
no_blanks - 'true' No blanks between summands. 'false' A blank between summands.
Returns:
Representation of the hypernumber with components and base elements. E.g. "x1*e1+x2*e2+x3*e3+x4*e4+x5*e5+x6*e6+x7*e7+x8*e8".

asString

public java.lang.String asString()

getNormedMultiplicationTable

public static java.lang.String[][] getNormedMultiplicationTable(java.lang.String[][] mult_table,
                                                                java.lang.String[] basis,
                                                                java.lang.String[] sub_basis)
A normed multiplication table is per definition a table where the base elements are numbered according to the order of their occurence in the basis vector (integers running from 1 upwards). Example: Normed right handed quaternion multiplication table: 1 2 3 4 2 -1 4 -3 3 -4 -1 2 4 3 -2 -1 An equivalent conventional multiplication table would look like that: e i j k i -e k -j j -k -e i k j -i -e We assume that the structure constants are +1, -1 or 0. The normed table is useful for comparing multiplication tables of different hypernumbers.

Parameters:
A - sub table based on the sub basis is projected out.
Returns:
Normed multiplication table.

square

public Hypernumber square()
                   throws java.lang.Exception
Returns:
The hypernumber multiplied with itself.
Throws:
java.lang.Exception

getSignature

public java.lang.String getSignature()
Returns:
Signature (m,n). m is the number of base elements that square to 1, n the number of base elements that square to -1.

getNormSquaredAsValue

public double getNormSquaredAsValue()
                             throws java.lang.Exception
REQUIRES: Invocation in numerical mode.

Returns:
Norm, defined as N(x) = x*x_conjugate.
Throws:
java.lang.Exception

getNormSquared

public static Hypernumber getNormSquared(Hypernumber h)
                                  throws java.lang.Exception
Parameters:
h - Hypernumber
Returns:
A hypernumber with the norm in the 1-st component.
Throws:
java.lang.Exception

getMultTableDiagonal

public java.lang.String getMultTableDiagonal()

getDiagonalProducts

public java.lang.String getDiagonalProducts()

getComponentsOfGrade

public java.lang.String[] getComponentsOfGrade(int grade,
                                               java.util.TreeMap<java.lang.Integer,java.lang.Integer> grades)
Returns:
Vector components in the order defined by the basis.

getNumberOfComponents

public int getNumberOfComponents(int grade,
                                 java.util.TreeMap<java.lang.Integer,java.lang.Integer> grades)
Parameters:
grade - Grade.
Returns:
Number of components for a given grade.

negate

public Hypernumber negate()
                   throws java.lang.Exception
Negates the hypernumber: h --> -h.

Returns:
Negated hypernumber h.
Throws:
java.lang.Exception

conjugate

public Hypernumber conjugate()
                      throws java.lang.Exception
Returns:
The conjugate of the hypernumber, i.e. reverses the signs of the imaginary hypercomplex components.
Throws:
java.lang.Exception

getConjugate

public static Hypernumber getConjugate(Hypernumber h)
                                throws java.lang.Exception
Returns:
A conjugated copy of the hypernumber.
Throws:
java.lang.Exception

dual

public static Hypernumber dual()
                        throws java.lang.Exception
// TODO Implementation not clear, as we have to distinguish between a left- and // a right dual ...

Returns:
Throws:
java.lang.Exception

getDual

public static Hypernumber getDual(Hypernumber h)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getHermitianConjugate

public Hypernumber getHermitianConjugate()
                                  throws java.lang.Exception
The hermitian conjugate of a hypernumber H is defined as: *H = *(S,S) = (*S,S) where S is the subalgebra from which the hypernumber is constructed via a (Cayley-Dickson) doubling procedure. The hermitian conjugate obeys *(AB) = *B*A

Returns:
Hermitian conjugate.
Throws:
java.lang.Exception

add

public Hypernumber add(Hypernumber h)

getMultiplicativeOrder

public int getMultiplicativeOrder(Hypernumber h,
                                  int max_steps)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getMultiplicativeOrder

public int getMultiplicativeOrder(Hypernumber h,
                                  int mult_steps,
                                  double zero_precision)
                           throws java.lang.Exception
Multiplicative order n, defined by: {min n: h1*(h2^n) = l*h1} with l a scalar factor. REQUIRES: Mode must be set to numerical.

Parameters:
h - Hypernumber
mult_steps - Upper limit up to which multiplicative orders are tested.
Returns:
Order if found within the bounds of the limit else: "-2" if a zero divisor was encountered "-3" if NAN TODO "-1" in all other cases, i.e. for the given number of multiplication steps no cyclicity is found.
Throws:
java.lang.Exception

add

public Hypernumber add(Hypernumber h,
                       boolean collect_terms)
Add a bypercomplex number.

Parameters:
h - Hypercomplex number to be added.
collect_terms - true: Terms are added or subtracted if possible. false: Terms are not added or subtracted. (This is interesting if they contain functions and differential operators for which the order is relevant. The simplification procedure ignores the order).
Returns:
Result of addition.

subtract

public Hypernumber subtract(Hypernumber h)
                     throws java.lang.Exception
Subtracts a hypernumber.

Parameters:
h - Hypernumber to be subtacted.
Returns:
Result of subtraction.
Throws:
java.lang.Exception

multiplyWithScalar

public Hypernumber multiplyWithScalar(java.lang.String scalar)
                               throws java.lang.Exception
Multiplication with a scalar.

Parameters:
scalar - Scalar.
Returns:
Hypernumber multiplied with a scalar.
Throws:
java.lang.Exception

rightMultiplyWith

public Hypernumber rightMultiplyWith(Hypernumber h2)
                              throws java.lang.Exception
Throws:
java.lang.Exception

rightMultiplyWith

public Hypernumber rightMultiplyWith(Hypernumber h,
                                     boolean collect_terms)
                              throws java.lang.Exception
Multiply with another hypercomplex number. The other hypercomplex number is multiplied from the right side. (Hypercomplex multiplication is non-commutative). (Brackets are not recognized as such). REQUIRES: Preceding invocation of simplifyPlusMinus (), simplifyNumericalFactors ().

Parameters:
h2 - Hypercomplex number to be multiplied with.
collect_terms - true: Terms are added or subtracted if possible. false: Terms are not added or subtracted. (This is interesting if they contain functions and differential operators for which the order is relevant. The simplification procedure ignores the order).
Returns:
Result of the multiplication.
Throws:
java.lang.Exception

getLeftCovariantDerivative

public Hypernumber getLeftCovariantDerivative(Hypernumber covariant_deriv_op,
                                              Hypernumber h)
                                       throws java.lang.Exception
The covariant derivative of the hypernumber is calculated. This is carried out in 2 steps: i) The covariant derivative operator (which is also a hypernumber) is left-multiplied with the hypernumber. ii) The Leibniz rule for the partial derivatives is applied component-wise. THE CHAIN RULE OF DIFFERENTIATION IS NOT IMPLEMENTED AT THE MOMENT ! To simplify things only 2 rules apply: i) A partial derivative takes the form d[] (only one variable is allowed. It only acts on functions, i.e. d[x]*x = 0 as x is treated as constnant. ii) A function takes the form [, , ...] 'd' is not allowed for the function name as it is reserved for the partial derivative. Example: Left covariant derivative = (d[x]+ A[y],1,1,x) hypernumber = (A[x,y,z]*B[X], A[x,y,z], a*b,0) The result of the action of the 1-st component of the covariant derivative on the first component of the hypernumber is: (d[x]+ A[y])(A[x,y,z]*B[x]) = d[x]A[x,y,z]*B[x] + A[x,y,z]*d[x]B[x] + A[y]*A[x,y,z]*B[x] The partial derivatives in the result only acts on the subsequent function. The '*' is omitted such that when the function is invoked a second time no ambiguity arises.

Parameters:
covariant_deriv_op - Covariant derivative operator.
h - Hypernumber upon which the covariant derivative is to act upon.
Returns:
Left covariant derivative of hypernumber.
Throws:
java.lang.Exception

getSum

public static Hypernumber getSum(Hypernumber h1,
                                 Hypernumber h2)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getDifference

public static Hypernumber getDifference(Hypernumber h1,
                                        Hypernumber h2)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getNegated

public static Hypernumber getNegated(Hypernumber h)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getImaginaryPart

public static Hypernumber getImaginaryPart(Hypernumber h)
                                    throws java.lang.Exception
Parameters:
h - Hypernumber
Returns:
The imaginary part of a Hyoernumner, i.e. the 1st component is set to zero.
Throws:
java.lang.Exception

getProduct

public static Hypernumber getProduct(Hypernumber h1,
                                     Hypernumber h2)
                              throws java.lang.Exception
Multiplies two hypernummers according to the order of the arguments of the method.

Parameters:
h1 - Hypermummer 1.
h2 - Hypernummer 2.
Returns:
h1*h2.
Throws:
java.lang.Exception

getProductWithScalar

public static Hypernumber getProductWithScalar(Hypernumber h,
                                               java.lang.String scalar)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getCommutator

public static Hypernumber getCommutator(Hypernumber h1,
                                        Hypernumber h2)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getCommutator

public static Hypernumber getCommutator(Hypernumber h1,
                                        Hypernumber h2,
                                        boolean collect_terms)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getAntiCommutator

public static Hypernumber getAntiCommutator(Hypernumber h1,
                                            Hypernumber h2)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getAssociator

public static Hypernumber getAssociator(Hypernumber h1,
                                        Hypernumber h2,
                                        Hypernumber h3)
                                 throws java.lang.Exception
Parameters:
h1 - Hypernumber 1
h2 - Hypernumner 2
h3 - Hypernumber 3
Returns:
Associator: [h1,h2,h3] != (h1*h2)*h3 - h1*(h2*h3).
Throws:
java.lang.Exception

getJordanAssociator

public static Hypernumber getJordanAssociator(Hypernumber h1,
                                              Hypernumber h2,
                                              Hypernumber h3)
                                       throws java.lang.Exception
Parameters:
h1 - Hypernumber 1
h2 - Hypernumber 2
h3 - Hypernumber 3
Returns:
Jordan Associator defined by: {{h1,h2},h3}- {h1,{h2,h3}}
Throws:
java.lang.Exception

getAlternator1

public static Hypernumber getAlternator1(Hypernumber h1,
                                         Hypernumber h2,
                                         Hypernumber h3,
                                         Hypernumber h4)
                                  throws java.lang.Exception
Parameters:
h1 - Hypernumber 1
h2 - Hypernumner 2
h3 - Hypernumber 3
h4 - Hypernumber 4
Returns:
Alternator 1: [h1,h2,h3,h4]_1 != ((h1h2)h3)h4 - 2(h1h2)(h3h4) + h1(h2(h3h4))
Throws:
java.lang.Exception

getAlternator2

public static Hypernumber getAlternator2(Hypernumber h1,
                                         Hypernumber h2,
                                         Hypernumber h3,
                                         Hypernumber h4)
                                  throws java.lang.Exception
Parameters:
h1 - Hypernumber 1
h2 - Hypernumner 2
h3 - Hypernumber 3
h4 - Hypernumber 4
Returns:
Alternator 2: [h1,h2,h3,h4]_2 != [h1, h2, h3] h4 + h1 [h2, h3, h4] - [h1, h2h3, h4]
Throws:
java.lang.Exception

getAntiAssociator

public static Hypernumber getAntiAssociator(Hypernumber h1,
                                            Hypernumber h2,
                                            Hypernumber h3)
                                     throws java.lang.Exception
Parameters:
h1 - Hypernumber 1
h2 - Hypernumner 2
h3 - Hypernumber 3
Returns:
Anti-Associator: (h1,h2,h3) != (h1*h2)*h3 + h1*(h2*h3).
Throws:
java.lang.Exception

getTrace

public static Hypernumber getTrace(Hypernumber h)
                            throws java.lang.Exception
The trace of a hypernumber is defined as tr(h) = h + conjugate(h) = 2*real part (h).

Parameters:
h - Hypermummer.
Returns:
Trace.
Throws:
java.lang.Exception

getVectorDerivative

public static Hypernumber getVectorDerivative(Hypernumber direction,
                                              Hypernumber function)
Derivative in direction of a vector 'a' for a hypernumber-valued function F: (a*d)F with '*' being the inner product and 'd' a

Parameters:
direction -
function -
Returns:
Derivative.

getJacobian

public static Hypernumber getJacobian(Hypernumber h1,
                                      Hypernumber h2,
                                      Hypernumber h3)
                               throws java.lang.Exception
Parameters:
h1 - Hypernumber 1.
h2 - Hypernumber 2.
h3 - Hypernumber 3.
Returns:
(h1*h2)*h3 + (h2*h3)*h1 + (h3*h1)*h2
Throws:
java.lang.Exception

getCommutatorJacobian

public static Hypernumber getCommutatorJacobian(Hypernumber h1,
                                                Hypernumber h2,
                                                Hypernumber h3)
                                         throws java.lang.Exception
Parameters:
h1 - Hypernumber 1.
h2 - Hypernumber 2.
h3 - Hypernumber 3.
Returns:
[[h1,h2],h3] + [[h2,h3],h1] + [[h3,h1],h2]
Throws:
java.lang.Exception

getCommutatorSaglian

public static Hypernumber getCommutatorSaglian(Hypernumber h1,
                                               Hypernumber h2,
                                               Hypernumber h3,
                                               Hypernumber h4)
                                        throws java.lang.Exception
Parameters:
h1 - Hypernumber 1.
h2 - Hypernumber 2.
h3 - Hypernumber 3.
h4 - Hypernumber 3.
Returns:
[[[A,B],C],D]+[[[B,C],D],A]+[[[C,D],A],B]+[[[D,A],B],C]+[[B,D],[A,C]]
Throws:
java.lang.Exception

getFirstHetztelPeresian

public static Hypernumber getFirstHetztelPeresian(Hypernumber a,
                                                  Hypernumber b,
                                                  Hypernumber c,
                                                  Hypernumber d,
                                                  Hypernumber e)
                                           throws java.lang.Exception
Parameters:
a - Hypernumber 1
b - Hypernumber 2
c - Hypernumber 3
d - Hypernumber 4
e - Hypernumber 5
Returns:
sigma{b,c,e} ([a,(c,d,e),b] + [a,b,(c,d,e)]) sigma{b,c,e} ([a,{{c,d},e} - {c,{d,e}},b] + [a,b,{{c,d},e} - {c,{d,e}}]) with sigma{b,c,e} the cyclic permutations over b,c,e and (c,d,e) the Jordan associator.
Throws:
java.lang.Exception

isLinearlyDependent

public static boolean isLinearlyDependent(Hypernumber h1,
                                          Hypernumber h2,
                                          boolean pos_and_neg)
Tests linear dependency, i.e. if h1 = c*h2 is satisfied, with "c" a (real) non-zero constant.

Parameters:
h1 - Hypernumber 1.
h2 - Hypernumber 2.
r - pos_and_neg true: "c" may be positive and negative. false: Only positive values for "c" are allowed. REQUIRES: Mode must be set to numerical.
Returns:
'true': if h1 and h2 are linearly dependentend. 'false': else.

getSecondHetztelPeresian

public static Hypernumber getSecondHetztelPeresian(Hypernumber h1,
                                                   Hypernumber h2,
                                                   Hypernumber h3,
                                                   Hypernumber h4)
                                            throws java.lang.Exception
Parameters:
h1 - Hypernumber 1
h2 - Hypernumber 2
h3 - Hypernumber 3
h4 - Hypernumber 4
Returns:
[A(AB)-(BA)A,C,D] + [{[A,B],C},A,D] - [[A,B],{A,C},D]
Throws:
java.lang.Exception

getAssociationType

public static Hypernumber getAssociationType(int nr,
                                             Hypernumber a,
                                             Hypernumber b,
                                             Hypernumber c,
                                             Hypernumber d)
                                      throws java.lang.Exception
There are 5 ways to put the brackets in a product of 4 hypernumbers. These 5 so called asssociation types of order 4 are: nr 1 ((ab)c)d 2 a(b(cd)) 3 (a(bc))d 4 a((bc)d) 5 (ab)(cd)

Parameters:
nr - Number of association type.
a - 1-st hypernumber of product.
b - 2-nd hypernumber of product.
c - 3-rd hypernumber of product.
d - 4-th hypernumber of product.
Returns:
Association type.
Throws:
java.lang.Exception

getAssociationTypeAsString

public static java.lang.String getAssociationTypeAsString(int nr,
                                                          java.lang.String a,
                                                          java.lang.String b,
                                                          java.lang.String c,
                                                          java.lang.String d)
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

getAssociationTypeCommutator

public static Hypernumber getAssociationTypeCommutator(int nr,
                                                       Hypernumber a,
                                                       Hypernumber b,
                                                       Hypernumber c,
                                                       Hypernumber d)
                                                throws java.lang.Exception
There are 5 ways to nest 3 commutators of 4 hypernumbers, namely nr 1 [[[a,b],c],d] 2 [a,[b,[c,d]]] 3 [[a,[b,c]],d] 4 [a,[[b,c],d]] 5 [[a,b],[c,d]]

Parameters:
nr - Number of triple commutator
a - 1-st hypernumber of product.
b - 2-nd hypernumber of product.
c - 3-rd hypernumber of product.
d - 4-th hypernumber of product.
Returns:
Triple commutator.
Throws:
java.lang.Exception

getAssociationTypeCommutatorAsString

public static java.lang.String getAssociationTypeCommutatorAsString(int nr,
                                                                    java.lang.String a,
                                                                    java.lang.String b,
                                                                    java.lang.String c,
                                                                    java.lang.String d)
                                                             throws java.lang.Exception
Throws:
java.lang.Exception

getAssociationType

public static Hypernumber getAssociationType(int nr,
                                             Hypernumber a,
                                             Hypernumber b,
                                             Hypernumber c,
                                             Hypernumber d,
                                             Hypernumber e)
                                      throws java.lang.Exception
There are 14 ways to put the brackets in a product of 5 hypernumbers. These 14 so called association types of order 5 are: nr 1 a(b(c(de))) 2 a(b((cd)e)) 3 a((bc)(de)) 4 a((b(cd))e) 5 a(((bc)d)e) 6 (ab)(c(de)) 7 (ab)((cd)e) 8 (a(bc))(de) 9 (a(b(cd)))e 10 (a((bc)d))e 11 ((ab)c)(de) 12 ((ab)(cd))e 13 ((a(bc))d)e 14 (((ab)c)d)e

Parameters:
nr - Number of association type.
a - 1-st hypernumber of product.
b - 2-nd hypernumber of product.
c - 3-rd hypernumber of product.
d - 4-th hypernumber of product.
e - 5-th hypernumber of product.
Returns:
Association type.
Throws:
java.lang.Exception

getAssociationTypeAsString

public static java.lang.String getAssociationTypeAsString(int nr,
                                                          java.lang.String a,
                                                          java.lang.String b,
                                                          java.lang.String c,
                                                          java.lang.String d,
                                                          java.lang.String e)
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

getAssociationTypeCommutator

public static Hypernumber getAssociationTypeCommutator(int nr,
                                                       Hypernumber a,
                                                       Hypernumber b,
                                                       Hypernumber c,
                                                       Hypernumber d,
                                                       Hypernumber e)
                                                throws java.lang.Exception
There are 14 ways to nest 4 commutators of 5 hypernumbers, namely nr 1 [a,[b,[c,[d,e]]]] 2 [a,[b,[[c,d],e]]] 3 [a,[[b,c],[d,e]]] 4 [a,[[b,[c,d]],e]] 5 [a,[[[b,c],d],e]] 6 [[a,b][c,[d,e]]] 7 [[a,b][[c,d],e]] 8 [[a,[b,c]],[d,e]] 9 [[a,[b,[c,d]]],e] 10 [[a,[[b,c],d]],e] 11 [[[a,b],c],[d,e]] 12 [[[a,b],[c,d]],e] 13 [[[a,[b,c]],d],e] 14 [[[[a,b],c],d],e]

Parameters:
nr - Number of quadruple commutator
a - 1-st octonion of product.
b - 2-nd octonion of product.
c - 3-rd octonion of product.
d - 4-th octonion of product.
Returns:
Quadruple commutator.
Throws:
java.lang.Exception

getAssociationTypeCommutatorAsString

public static java.lang.String getAssociationTypeCommutatorAsString(int nr,
                                                                    java.lang.String a,
                                                                    java.lang.String b,
                                                                    java.lang.String c,
                                                                    java.lang.String d,
                                                                    java.lang.String e)
                                                             throws java.lang.Exception
Throws:
java.lang.Exception

getCommuAssociator

public static Hypernumber getCommuAssociator(Hypernumber h1,
                                             Hypernumber h2,
                                             Hypernumber h3,
                                             Hypernumber h4)
                                      throws java.lang.Exception
Parameters:
h1 - Hypernumber 1
h2 - Hypernumner 2
h3 - Hypernumber 3
h4 - Hypernumber 4
Returns:
Commu-Associator: [A,B,C,D] = [[A,B],C,D]-[[A,B,C],D]+[[D,B],C,A]-[[D,B,C],A]
Throws:
java.lang.Exception

getCommutatorWith

public Hypernumber getCommutatorWith(Hypernumber h)
                              throws java.lang.Exception
Analysis *

Throws:
java.lang.Exception

getCommutatorWith

public Hypernumber getCommutatorWith(Hypernumber h,
                                     boolean collect_terms)
                              throws java.lang.Exception
Calculates the commutator of the the hypernumber h1 with another one h2 which is defined as: [h1, h2] = h1*h2 - h2*h1

Parameters:
h - Second hypernumber
collect_terms - true: Terms are added or subtracted if possible. false: Terms are not added or subtracted. (This is interesting if they contain functions and differential operators for which the order is relevant. The simplification procedure ignores the order).
Returns:
The commutator of the hypernumber with another one.
Throws:
java.lang.Exception

getAntiCommutatorWith

public Hypernumber getAntiCommutatorWith(Hypernumber h)
                                  throws java.lang.Exception
Calculates the anti-commutator of the hypernumber h1 with another one h2 which is defined as: {h1, h2} = h1*h2 + h2*h1

Parameters:
h - Second hypernumber.
Returns:
The anti-commutator of the hypernumber with another one.
Throws:
java.lang.Exception

isOrthogonalTo

public boolean isOrthogonalTo(Hypernumber h)
                       throws java.lang.Exception
Throws:
java.lang.Exception

isOrthogonal

public static boolean isOrthogonal(Hypernumber h1,
                                   Hypernumber h2)
                            throws java.lang.Exception
Throws:
java.lang.Exception

isCommutative

public static boolean isCommutative(Hypernumber h1,
                                    Hypernumber h2)
                             throws java.lang.Exception
Throws:
java.lang.Exception

getVectorProduct

public static Hypernumber getVectorProduct(Hypernumber h1,
                                           Hypernumber h2)
                                    throws java.lang.Exception
The vector product "x" of two hypernumbers h1 and h2 is defined as h1 x h2 = Im(Im(h1)*Im(h2)) = 0.5 [h1,h2] It coincides with the conventional vector product in 3 dimensions for the quaternions and the vector product in 7-dimensions for the octonions. These two vector products fulfill certain constraints and it can be shown that under these conditions they are the only ones. The vector product given here however is more broadly defined. E.g. for the sedenions it can be non alternative. Example: Quaternion h1 = (a0,a1,a2,a3) --> Im(h1) = (0,a1,a2,a3) Quaternion h2 = (b0,b1,b2,b3) --> Im(h2) = (0,b1,b2,b3) Im(h1)*Im(h2) = (...) --> h1xh2 = (0,b1,b2,b3)

Parameters:
h1 - Hypernumber 1.
h2 - Hypernumber 2.
Returns:
Hypernumber with the
Throws:
java.lang.Exception

getScalarProduct

public static Hypernumber getScalarProduct(Hypernumber h1,
                                           Hypernumber h2)
                                    throws java.lang.Exception
The scalar product <.|.> of two hypernumbers h1 and h2 is defined as = 1/2(h1h2*+h2h1*)

Parameters:
h1 - Hypernumber 1.
h2 - Hypernumber 2.
Returns:
Scalar product of h1 and h2.
Throws:
java.lang.Exception

getOuterProduct

public static Hypernumber getOuterProduct(Hypernumber h1,
                                          Hypernumber h2)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getGradedInnerProduct

public static Hypernumber getGradedInnerProduct(Hypernumber h1,
                                                Hypernumber h2,
                                                boolean with_grade_0)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

calculateBCHWith

public Hypernumber calculateBCHWith(Hypernumber h,
                                    int from_order,
                                    int to_order)
                             throws java.lang.Exception
The Baker Campbell Hausdorff formula (BCH) is calculated for a specified range of orders. It is given by: [A,B] = h1 + h2 + h3 + ... with h1, h2, ... being the orders that are given by h1 = A + B h2 = 1/2 * [A,B] h3 = 1/12 * [A,[A,B]] - 1/12 * [B,[A,B]] h4 = -1/24 * [B,[A,[A,B]]] and [,] the commutator. The implementation is currently up to order 4.

Parameters:
b - Hypernumber h2.
from_order - lowest order of order range. Possible values: 1,2,3,4.
to_order - largest order of order range. Possible values: 1,2,3,4.
Returns:
The result of the BCH formula for the given range of orders.
Throws:
java.lang.Exception

isZero

public boolean isZero()
Returns:
True if all components are 0,

isClosedAlgebra

public static boolean isClosedAlgebra(Hypernumber[] h)
                               throws java.lang.Exception
REQUIRES: Mode must be set to numerical.

Parameters:
h - Hypermumbers.
Returns:
'true' the hypernumbers form a closed algebra under the multiplication given by h. 'false' else.
Throws:
java.lang.Exception

getRandomClosedPair

public static Hypernumber[] getRandomClosedPair(Hypernumber[] h)
                                         throws java.lang.Exception
From the given set of hypernumbers a random pair is chosen (non trivial, i.a. the two elements are supposed to be different). It is then veryfied if the product occurs within the set of hypernumbers. If this is so, the pair of hypernumbers and the product are returned. If not the step is repeated.

Parameters:
h - Hypernumbers.
Returns:
Three hypernumbers that satisfy h1*h2 = h3.
Throws:
java.lang.Exception

getRandomNonClosedPair

public static Hypernumber[] getRandomNonClosedPair(Hypernumber[] h)
                                            throws java.lang.Exception
From the given set of hypernumbers a random pair is chosen (non trivial, i.a. the two elements are supposed to be different). It is then veryfied if the product occurs within the set of hypernumbers. If this is not so, the pair of hypernumbers and the product are returned. Else the step is repeated.

Parameters:
h - Hypernumbers.
Returns:
Three hypernumbers don't satisfy h1*h2 = h3.
Throws:
java.lang.Exception

getNumberOfClosedElements

public static int getNumberOfClosedElements(Hypernumber[] h)
                                     throws java.lang.Exception
In case that the full set of elements is not closed under multiplication, it might be of interest for how many of its elements this property is still given. The method determines the order of such a subset.

Parameters:
h - Hypernumbers.
Returns:
Number of elements
Throws:
java.lang.Exception - Number of elements of a subset that is closed under multiplication in respect to the full set.

getNumberOfClosedPairs

public static int getNumberOfClosedPairs(Hypernumber[] h)
                                  throws java.lang.Exception
For every posssible pair of the given set of hypernumbers it is checked if the prodeuct is again contained in the set. As there are n^2 pairings, with n the number of elements of the set to be tested, for a set to be closed under multiplication this method must yield n^2.

Parameters:
h - Hypernumbers.
Returns:
Number of elements
Throws:
java.lang.Exception - Number of pairs of elements of the given set of hypernumbers that is closed under multiplication in respect to the full set.

isAutomorphism

public boolean isAutomorphism(Hypernumber x,
                              Hypernumber y)
                       throws java.lang.Exception
Checks if given hypernumber is related to the hypernumbers x,y via the automorphism map: a^{-1}xy a = l (a^{-1}x a) (a^{-1}y a) with l a constant, i.e. we do not require an appropriate normalisation of the hypernumbers. Although the order of multipliction should not matter, we check for this. REQUIRES: Mode must be set to numerical.

Parameters:
x - Hypernumber.
x - Hypernumber.
Returns:
'true' if the given hypernumber acts as an isomorphism on x and y, 'false' else.
Throws:
java.lang.Exception

getNumberOfNonzeroComponents

public int getNumberOfNonzeroComponents()
Returns:
Number of non-zero components.
Throws:
java.lang.Exception

getSubalgebras

public static java.util.HashSet<java.lang.String> getSubalgebras(java.lang.Class class_,
                                                                 int order)
                                                          throws java.lang.Exception
Determines all subalgebras of order n. A subalgebra of order n is identified as follows: Two hypernumbers with n non-zero components are multiplied with one another (with the non-zero components in the same positions). If the zero components are mapped to zero components in the resulting product the subbasis defined by the n components is assumed to be a basis of a subalgebra. Example: Basis: {e1,e2,e3,e4,e5,e6} Hypernumber 1: h1 = (1,0,0,1,1,0) Hypernumber 2: h2 = (1,0,0,1,1,0) h1*h2 = (3,0,0,4,2,0) --> subalgera defined by basis {e1,e4,e5}

Parameters:
order - Order.
Returns:
(Closed) subspaces of given order.
Throws:
java.lang.Exception
java.lang.Exception

getSubalgebrasAsString

public static java.lang.String getSubalgebrasAsString(java.lang.Class<?> class_,
                                                      int order)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

getSubalgebrasSignatures

public java.util.Collection<java.lang.String> getSubalgebrasSignatures(java.lang.Class<?> class_,
                                                                       int order)
                                                                throws java.lang.Exception
Throws:
java.lang.Exception

getNextBitmap

public static java.lang.String getNextBitmap(java.lang.String bitmap)
Used for permuting a bitmap with n 1's. Carries out one step in that the next permutation is generated. Examples: 00100100 --> 00100010 00100001 --> 00011000 Algorithm; i) Find last "10". ii) Flip 0 and 1. iii) Shift all following 1's to the left.

Parameters:
bitmap - Bitmap of 0's and 1's, e.g. "010010010".
Returns:
Bitmap of next permutation step.

getExpressionAsList

public java.util.LinkedList<java.lang.String> getExpressionAsList(java.lang.String expression)
An expression is split up in respect to the summands. E.g. a1+2*a2-3*a3 |--> (a1,2*a2,-3*a3). REQUIRES: The numerical factors must be in front of the terms.

Parameters:
expression - Expression consisting of terms.
Returns:
Array of the terms.

getIntersection

public static java.util.HashSet<Hypernumber> getIntersection(Hypernumber[] h1,
                                                             Hypernumber[] h2)
                                                      throws java.lang.Exception
Two sets of hypernumbers are compared. The set of hypernumbers that occur in both sets is returned.

Parameters:
h1 - First set with hypernumbers.
h2 - Second set with hypernumbers.
Returns:
Intersection of h1 and h2.
Throws:
java.lang.Exception

simplifyPlusMinus

public void simplifyPlusMinus()
Simplifies the components, replacing any adjacent "+"'s and "-"'s according to: "++" --> "+" "+-" --> "-" "-+" --> "-" "--" --> "+"


simplifyNumericalFactors

public void simplifyNumericalFactors()
For the components the factors of all terms separated by "+" or "-" are moved to the front and are multiplied with one another. E.g. 2*x1*4*x2 = 8*x1*x2 or 2*x1*-4*x2 = -8*x1*x2 TODO e.g. 2*x1*-x2 = -2*x1*x2 REQUIRES: Preceding invocation of simplifyPlusMinus ().


simplifyNumericalSummands

public void simplifyNumericalSummands()
Numerical summands are simplified, i.e. added or subtracted. Example: 2*x1+5-6+5*x2 --> 2*x1-1+5*x2


applyLeibnizRule

public Hypernumber applyLeibnizRule(Hypernumber h)
TODO: meanwhile see 'getLeftCovariantDerivative ()'

Parameters:
h - Hypernumber
Returns:

collectTerms

public void collectTerms()
Equal terms of the components are added or subtracted wherever possible. E.g. x1*y1+x2*y2-2*x1*y1 = -x1*y1+x2*y2. REQUIRES: Preceeding invocation of simplifyNumericalFactors ().


getTraceRespDeterminant

public double getTraceRespDeterminant(Hypernumber h)

getNumericalInverse

public static Hypernumber getNumericalInverse(Hypernumber h)
                                       throws java.lang.NumberFormatException,
                                              java.lang.Exception
The inverse of a hypernumber h is calculated. This method is only implemented in the numerical mode. The inverse h^-1 is given by h^-1 = conj(h)/(abs(h)^2)

Parameters:
h - Hypernumber
Returns:
Inverse of the hypernumber h.
Throws:
java.lang.NumberFormatException
java.lang.Exception

compressComponents

public void compressComponents()
Removes all blanks from components as they are algebraically redundant.